3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function error_handler_first($no, $msg){ echo __FUNCTION__ . PHP_EOL; restore_error_handler(); } function error_handler_second($no, $msg){ echo __FUNCTION__ . PHP_EOL; restore_error_handler(); } set_error_handler("error_handler_first"); set_error_handler("error_handler_second"); trigger_error("error1"); trigger_error("error2"); trigger_error("error3");
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.6.28, 7.0.0 - 7.1.0
error_handler_second error_handler_first error_handler_first
Output for hhvm-3.10.0 - 3.12.0
error_handler_second error_handler_first Notice: error3 in /in/UFcCf on line 17
Output for 4.3.10 - 4.3.11, 5.0.2 - 5.0.4
error_handler_second error_handler_second error_handler_second
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/UFcCf on line 9 error_handler_secondPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/UFcCf on line 9 error_handler_secondPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/UFcCf on line 9 error_handler_secondPHP_EOL