3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function meh() { static $a = 10; $a--; echo "$a\n"; if ($a > 0) { set_error_handler('meh'); trigger_error('lol', E_USER_ERROR); } else return true; } set_error_handler('meh'); trigger_error('lol', E_USER_ERROR);
based on mlYWo
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
9 8 7 6 5 4 3 2 1 0
Output for hhvm-3.12.0
9 Fatal error: lol in /in/WQuQp on line 9 8
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.