xref: /php-src/Zend/tests/gh13178_1.phpt (revision d6536468)
1--TEST--
2GH-13178: Packed to hash must reset iterator position
3--FILE--
4<?php
5$array = ['foo'];
6foreach ($array as $key => &$value) {
7    var_dump($key);
8    unset($array[$key]);
9    $array[] = 'foo';
10    if ($key === 10) {
11        break;
12    }
13}
14?>
15--EXPECT--
16int(0)
17int(1)
18int(2)
19int(3)
20int(4)
21int(5)
22int(6)
23int(7)
24int(8)
25int(9)
26int(10)
27