3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { echo 'X'; print_r( set_error_handler('var_dump') ); restore_error_handler(); } set_error_handler('foo'); foo(); $a = $b;
based on vNgjV
Output for 4.3.0 - 7.1.0
XfooX