3v4l.org

run code in 300+ PHP versions simultaneously
<?php function user_exception_handler_01(Throwable $ex) { echo "01 Handled uncaught exception"; } function user_exception_handler_02(Throwable $ex) { restore_exception_handler(); throw new RuntimeException("Not able to handle, throwing another exception from handler"); echo "Should never see this"; } function throw_it() { throw new RuntimeException('Expected unexpected happened'); } function call_throw_it() { throw_it(); } set_exception_handler('user_exception_handler_01'); set_exception_handler('user_exception_handler_02'); call_throw_it();
Output for git.master, git.master_jit
Fatal error: Uncaught Error: Maximum call stack size of 8306688 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? in /in/ARJ9A:7 Stack trace: #0 [internal function]: user_exception_handler_02(Object(RuntimeException)) #1 {main} thrown in /in/ARJ9A on line 7
Process exited with code 255.
Output for rfc.property-hooks
01 Handled uncaught exception

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:
33.3 ms | 406 KiB | 5 Q