3v4l.org

run code in 300+ PHP versions simultaneously
<?php function error_handler($errno, $errstr, $errfile, $errline) { $a = func_get_args(); var_dump($a); } set_error_handler("error_handler"); try { $x = new NonexistantClass(); } catch (Exception $e) { var_dump($e->getMessage()); } catch (Error $e) { var_dump($e); } echo "Don't worry, everything is still fine!\n";

preferences:
47.21 ms | 402 KiB | 5 Q