xref: /PHP-8.4/Zend/tests/gh13178_4.phpt (revision d6536468)
1--TEST--
2GH-13178: Packed to hash must reset nInternalPointer
3--FILE--
4<?php
5$array = ['foo'];
6reset($array);
7while (true) {
8    $key = key($array);
9    next($array);
10    var_dump($key);
11    unset($array[$key]);
12    $array[] = 'foo';
13    if ($key === 10) {
14        break;
15    }
16}
17?>
18--EXPECT--
19int(0)
20int(1)
21int(2)
22int(3)
23int(4)
24int(5)
25int(6)
26int(7)
27int(8)
28int(9)
29int(10)
30