3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function default_error_handler($errorNumber, $message, $errfile, $errline){ var_dump($errorNumber, $message, $errfile, $errline, error_get_last()); echo "\r\n /default_error_handler"; } function unexpected_shutdown_handler(){ var_dump(error_get_last()); echo "\r\n /unexpected_shutdown_handler"; } set_error_handler('default_error_handler'); register_shutdown_function('unexpected_shutdown_handler'); try{ $a=new Fi(); }catch(Exception $e){ echo "\r\n catch Exception"; var_dump($e); } echo "\r\n end"; ?>
based on eEHAL
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'Fi' not found in /in/Zp645:14 Stack trace: #0 {main} thrown in /in/Zp645 on line 14 array(4) { ["type"]=> int(1) ["message"]=> string(84) "Uncaught Error: Class 'Fi' not found in /in/Zp645:14 Stack trace: #0 {main} thrown" ["file"]=> string(9) "/in/Zp645" ["line"]=> int(14) } /unexpected_shutdown_handler
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Class undefined: Fi in /in/Zp645 on line 14 int(16777217) string(19) "Class undefined: Fi" string(9) "/in/Zp645" int(14) array(4) { ["type"]=> int(16777217) ["message"]=> string(19) "Class undefined: Fi" ["file"]=> string(9) "/in/Zp645" ["line"]=> int(14) } /default_error_handlerarray(4) { ["type"]=> int(16777217) ["message"]=> string(19) "Class undefined: Fi" ["file"]=> string(9) "/in/Zp645" ["line"]=> int(14) } /unexpected_shutdown_handler
Output for 5.2.0 - 5.6.28
Fatal error: Class 'Fi' not found in /in/Zp645 on line 14 array(4) { ["type"]=> int(1) ["message"]=> string(20) "Class 'Fi' not found" ["file"]=> string(9) "/in/Zp645" ["line"]=> int(14) } /unexpected_shutdown_handler
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'Fi' not found in /in/Zp645 on line 14 Fatal error: Call to undefined function error_get_last() in /in/Zp645 on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/Zp645 on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/Zp645 on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Zp645 on line 13
Process exited with code 255.