3v4l.org

run code in 500+ PHP versions simultaneously
<?php set_error_handler(function() { echo 'Error handler executed' . PHP_EOL; return null; }); trigger_error(E_ERROR); echo PHP_EOL; echo PHP_EOL; echo "hello"; echo PHP_EOL; echo 'Now with return false:'; echo PHP_EOL; set_error_handler(function() { echo 'Error handler executed' . PHP_EOL; return false; }); trigger_error(E_ERROR); echo "hello";

preferences:
107.58 ms | 1641 KiB | 5 Q