3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1,2,3); $b = &$a; foreach($a as $key => $v) { echo "$v\n"; if ($key === 1) { unset($a[$key]); } }
based on CGs5g
Output for 5.3.19 - 7.2.0
1 2 3