3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($errorLevel, $errorMessage) { echo 'in set_error_handler' . PHP_EOL; echo 'errorLevel is ' . ($errorLevel == E_RECOVERABLE_ERROR ? '': 'NOT') . 'E_RECOVERABLE_ERROR' . PHP_EOL; echo $errorMessage . PHP_EOL; }); set_exception_handler(function($exception) { echo 'in set_exception_handler' . PHP_EOL; echo 'Exception is ' . get_class($exception) . PHP_EOL; echo $exception->getMessage() . PHP_EOL; }); function a(array $a){} a(null);

preferences:
56.23 ms | 402 KiB | 5 Q