3v4l.org

run code in 300+ PHP versions simultaneously
<?php function default_error_handler($errorNumber, $message, $errfile, $errline){ echo " default_error_handler:\r\n"; var_dump($errorNumber, $message, $errfile, $errline, error_get_last()); echo "/default_error_handler\r\n"; } function unexpected_shutdown_handler(){ echo " unexpected_shutdown_handler:\r\n"; var_dump(error_get_last()); echo "/unexpected_shutdown_handler\r\n"; } set_error_handler('default_error_handler'); register_shutdown_function('unexpected_shutdown_handler'); try{ $a=1/0 ; }catch(Exception $e){ echo " catch Exception:\r\n"; var_dump($e); } echo "end"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/ZGg6l:16 Stack trace: #0 {main} thrown in /in/ZGg6l on line 16 unexpected_shutdown_handler: array(4) { ["type"]=> int(1) ["message"]=> string(94) "Uncaught DivisionByZeroError: Division by zero in /in/ZGg6l:16 Stack trace: #0 {main} thrown" ["file"]=> string(9) "/in/ZGg6l" ["line"]=> int(16) } /unexpected_shutdown_handler
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.98 ms | 401 KiB | 8 Q