3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exceptionHandler() { echo "\n######### " . __FUNCTION__ . "() called #########\n"; new foo(); } function errorHandler() { echo "\n######### " . __FUNCTION__ . "() called #########\n"; new bar(); } set_exception_handler('exceptionHandler'); register_shutdown_function('errorHandler'); throw new Exception('x');

preferences:
38.17 ms | 402 KiB | 5 Q