3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($num, $msg, $file, $line) { throw new ErrorException($msg, 0, $num, $file, $line); }); set_exception_handler(function($e) { echo '** Uncaught Exception **'.PHP_EOL; echo $e->toString(); }); try { // Will be caught echo array(); } catch(ErrorException $e) {} // Will not be caught echo array();

preferences:
53.55 ms | 402 KiB | 5 Q