This commit is contained in:
Dmitry Stogov 2015-01-29 21:04:44 +03:00
parent 2705d17c93
commit 10a3260b1f

View File

@ -0,0 +1,13 @@
--TEST--
Foreach by reference and inserting new element when we are already at the end
--FILE--
<?php
$a = [1];
foreach($a as &$v) {
echo "$v\n";
$a[1]=2;
}
?>
--EXPECT--
1
2