3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function a() { var_dump('a called'); } function b(&$abort) { $abort = TRUE; var_dump('b called'); } function c() { var_dump('c called'); } foreach (array('a', 'b', 'c') as $handler) { $abort = FALSE; $args = array(); $args[] = &$abort; call_user_func_array($handler, $args); if ($abort) break; }
Output for 4.3.0 - 7.1.0
string(8) "a called" string(8) "b called"