3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [ [0 => '0', 1 => '1'] ]; foreach ($a as $key => $value) { $a[$key] = '2'; } var_dump($a);
Output for 5.6.0 - 7.3.0alpha1
array(1) { [0]=> string(1) "2" }