3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function __autoload($c) { echo $c; } function bar($t, $m) { echo $m;} function foo() { echo 'X'; restore_error_handler(); set_error_handler(array('bar','too')); $a = $c; } set_error_handler('bar'); set_error_handler('foo'); $a = $b; print_r( set_error_handler('var_dump') );
based on hclBS
Output for 5.0.5 - 7.1.0
Xbarset_error_handler() expects the argument (bar::too) to be a valid callbackUndefined variable: cbar
Output for 5.0.4
Xbarset_error_handler() expects the argument (bar::too) to be a valid callbackUndefined variable: cfoo
Output for 5.0.0 - 5.0.3
Xbarset_error_handler() expects the argument (bar::too) to be a valid callbackUndefined variable: cfoo
Output for 4.4.0 - 4.4.9
Xset_error_handler() expects argument 1, 'bar::too', to be a valid callbackUndefined variable: cbar
Output for 4.3.0 - 4.3.11
Xset_error_handler() expects argument 1, 'bar::too', to be a valid callbackUndefined variable: cfoo