3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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_02'); call_throw_it();

preferences:
24.29 ms | 405 KiB | 5 Q