3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function bar() { echo 'Bar';} function foo() { echo 'X'; restore_error_handler(); $a = $c; } set_error_handler('bar'); set_error_handler('foo'); $a = $b; print_r( set_error_handler('var_dump') );
based on FEYR8
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.6.28, 7.0.0 - 7.1.0
XBarbar
Output for hhvm-3.10.0 - 3.12.0
X Notice: Undefined variable: c in /in/nnRqf on line 7 bar
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
XBarfoo