3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { }

preferences:
33.1 ms | 402 KiB | 5 Q