3v4l.org

run code in 300+ PHP versions simultaneously
<?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"; ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
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 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
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.0.5, 5.1.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.3.11, 4.4.0 - 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.

preferences:
346.84 ms | 401 KiB | 456 Q