diff options
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/array_splice_empty_ht_iter_removal.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/array_splice_empty_ht_iter_removal.phpt b/Zend/tests/array_splice_empty_ht_iter_removal.phpt new file mode 100644 index 0000000000..1461827bc9 --- /dev/null +++ b/Zend/tests/array_splice_empty_ht_iter_removal.phpt @@ -0,0 +1,15 @@ +--TEST-- +HT iterator should be destroyed if array becomes empty during array_splice +--FILE-- +<?php +$a=[4]; +$i = 0; +foreach ($a as &$r) { + var_dump($r); + $a = array_splice($a, 0); + if (++$i == 2) break; +} +?> +--EXPECT-- +int(4) +int(4) |