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); } return true; } set_error_handler('meh'); trigger_error('lol', E_USER_ERROR);
based on WQuQp
Output for 4.3.0 - 7.1.0
9 8 7 6 5 4 3 2 1 0