xref: /PHP-7.4/ext/spl/tests/bug70053.phpt (revision 03d18d9a)
1--TEST--
2SPL: ArrayObject
3--FILE--
4<?php
5
6echo "-- Two empty iterators attached with infos that are different but same array key --\n";
7$mit = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC);
8$mit ->attachIterator(new EmptyIterator(), "2");
9$mit ->attachIterator(new EmptyIterator(), 2);
10var_dump($mit->countIterators());
11$mit->rewind();
12var_dump($mit->current());
13
14?>
15--EXPECT--
16-- Two empty iterators attached with infos that are different but same array key --
17int(2)
18array(1) {
19  [2]=>
20  NULL
21}
22