3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /*E_ERROR E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING*/ function exception_error_handler($errno, $errstr, $errfile, $errline) { var_dump($errstr); } set_error_handler("exception_error_handler", error_reporting()); function shutDownFunction() { $error = error_get_last(); var_dump($error); if ($error['type'] == 1) { //do your stuff } } register_shutdown_function('shutdownFunction'); echo "\n"; echo "Hello World"; echo "\n\n"; //var_dump(error_get_last()); declare($foo='bar');
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$foo' (T_VARIABLE), expecting identifier (T_STRING) in /in/qMETS on line 35
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING in /in/qMETS on line 35
Process exited with code 255.