diff options
Diffstat (limited to 'Zend/tests/foreach_007.phpt')
-rw-r--r-- | Zend/tests/foreach_007.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Zend/tests/foreach_007.phpt b/Zend/tests/foreach_007.phpt new file mode 100644 index 0000000000..b99bc73ebe --- /dev/null +++ b/Zend/tests/foreach_007.phpt @@ -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 |