No, you just need strict comparison (like you need it in JS and any other language with weak typing):
php > var_dump('9223372036854775807' == '9223372036854775808');
bool(true)
php > var_dump('9223372036854775807' === '9223372036854775808');
bool(false)