3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?phpdie(0); /*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()); echo "\n"; echo "Hello World"; echo "\n\n"; var_dump(error_get_last()); declare(foo='bar');
Output for 7.0.0 - 7.3.0rc4
Warning: Unsupported declare 'foo' in /in/LE4gh on line 20 Fatal error: Uncaught Error: Call to undefined function phpdie() in /in/LE4gh:1 Stack trace: #0 {main} thrown in /in/LE4gh on line 1
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Warning: Unsupported declare 'foo' in /in/LE4gh on line 20 Fatal error: Call to undefined function phpdie() in /in/LE4gh on line 1
Process exited with code 255.
Output for 4.3.0 - 5.3.29
<?phpdie(0); /*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()); echo "\n"; echo "Hello World"; echo "\n\n"; var_dump(error_get_last()); declare(foo='bar');