3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($foo) { echo "Executing foo\n"; } set_error_handler(function($errno, $errstr) { throw new Exception(array_search($errno, $errors) . ": " . $errstr); }); try { foo(); } catch (Exception $e) { echo $e->getMessage(), "\n"; }

preferences:
33.45 ms | 402 KiB | 5 Q