Maybe instead casting to int, ``is_numeric`` checking will be correct. is_numeric function returns true even if argument is a string that is number greater than ``PHP_MAX_INT``