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";
Output for 5.6.38, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
Error handler executed hello Now with return false: Error handler executed Notice: 1 in /in/rSesI on line 23 hello

preferences:
123.69 ms | 1641 KiB | 4 Q