3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function validateNumber($number) { try { //echo $number = (int)$number; var_dump(filter_var($number, FILTER_VALIDATE_INT); var_dump(ctype_digit ($number)); } catch(Exception $e) { throw new PageNotAnInteger('That page number is not an integer'); } } validateNumber('as');
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected ';' in /in/hnHMu on line 7
Process exited with code 255.