Update ansi.php

renamed class to a more clear name, static notation, parametrized offset increment, use exceptions for validation, boundaries as optional parameters