diff options
author | Rasmus Lerdorf <rasmus@lerdorf.com> | 2015-01-30 22:57:40 -0800 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@lerdorf.com> | 2015-01-30 22:57:40 -0800 |
commit | 74b85316ea06c17256e102483daa472f4b638221 (patch) | |
tree | abe0618e15fcfc93158b4239889485ffc70c4c1c /Zend/tests/foreach_015.phpt | |
parent | 130d7320b160443ca160ee6b3a19a034ee2c5ef1 (diff) | |
parent | 1e41295097576dbce6c197ddb7507c07ccae3cbe (diff) | |
download | php-git-74b85316ea06c17256e102483daa472f4b638221.tar.gz |
Merge branch 'foreach' of https://github.com/dstogov/php-src into dstogov-foreachdstogov-foreach
Diffstat (limited to 'Zend/tests/foreach_015.phpt')
-rw-r--r-- | Zend/tests/foreach_015.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/foreach_015.phpt b/Zend/tests/foreach_015.phpt new file mode 100644 index 0000000000..adc8085f34 --- /dev/null +++ b/Zend/tests/foreach_015.phpt @@ -0,0 +1,18 @@ +--TEST-- +array_shift() function precerve foreach by reference iterator pointer +--FILE-- +<?php +$a = [1,2,3,4]; +foreach($a as &$v) { + echo "$v\n"; + array_shift($a); +} +var_dump($a); +?> +--EXPECT-- +1 +2 +3 +4 +array(0) { +}
\ No newline at end of file |