3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $list = array("A","B","C","D"); $childList = $list; foreach ( $childList as $key => &$var ) { cleanChild($childList, $list, $var, $key); $childList = $list; } echo "\n"; function cleanChild(&$childList, &$list, $var, $key) { if ($key == 'B') { unset($list[$key]); } } ?>
Output for 5.3.0 - 5.4.19

Process exited with code 137.