xref: /php-src/ext/spl/tests/bug67360.phpt (revision b5d9983f)
1--TEST--
2Bug #67360 (Missing element after ArrayObject::getIterator)
3--FILE--
4<?php
5
6$array = array('' => 1, 1 => 2, 3 => 4);
7$ArrayObject = new ArrayObject($array);
8var_dump($ArrayObject);
9$Iterator = $ArrayObject->getIterator();
10var_dump(count($Iterator) === count($array));
11var_dump(iterator_to_array($Iterator));
12
13?>
14--EXPECTF--
15object(ArrayObject)#%d (1) {
16  ["storage":"ArrayObject":private]=>
17  array(3) {
18    [""]=>
19    int(1)
20    [1]=>
21    int(2)
22    [3]=>
23    int(4)
24  }
25}
26bool(true)
27array(3) {
28  [""]=>
29  int(1)
30  [1]=>
31  int(2)
32  [3]=>
33  int(4)
34}
35