mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
New test
This commit is contained in:
parent
2705d17c93
commit
10a3260b1f
1 changed files with 13 additions and 0 deletions
13
Zend/tests/foreach_007.phpt
Normal file
13
Zend/tests/foreach_007.phpt
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue