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 === 0) unset($a[1]); }
based on Z9Vfl
Output for 7.0.0 - 7.3.0rc4
1 2 3
Output for 5.3.19 - 5.6.28
1 3