3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(10, 20); foreach($a as $v) { var_dump($a); var_dump($v); unset($a[1]); } var_dump($v);
Output for 4.3.0 - 7.2.0
array(2) { [0]=> int(10) [1]=> int(20) } int(10) array(1) { [0]=> int(10) } int(20) int(20)