3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php exit(1); /*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(); 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.3.0 - 7.2.0
Warning: Unsupported declare 'foo' in /in/70fgq on line 27
Process exited with code 1.
Output for 4.3.0 - 5.2.17

Process exited with code 1.