3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function bar($t, $m) { echo $m;} function foo() { echo 'X'; restore_error_handler(); set_error_handler('bar'); var_dump( set_error_handler('bar') ); $a = $c; } set_error_handler('bar'); set_error_handler('foo'); $a = $b;
based on 7ZQuk
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
Xstring(3) "bar" Undefined variable: c
Output for hhvm-3.10.0 - 3.12.0
Xstring(3) "bar" Notice: Undefined variable: c in /in/TBTPQ on line 9
Output for 4.3.0 - 5.0.3
Xstring(3) "bar" Undefined variable: c