xref: /PHP-7.0/ext/spl/tests/array_016.phpt (revision 610c7fbe)
1--TEST--
2SPL: ArrayIterator/Object and IteratorIterator
3--FILE--
4<?php
5
6$it = new ArrayIterator(range(0,3));
7
8foreach(new IteratorIterator($it) as $v)
9{
10	var_dump($v);
11}
12
13$it = new ArrayObject(range(0,3));
14
15foreach(new IteratorIterator($it) as $v)
16{
17	var_dump($v);
18}
19
20?>
21===DONE===
22<?php exit(0); ?>
23--EXPECTF--
24int(0)
25int(1)
26int(2)
27int(3)
28int(0)
29int(1)
30int(2)
31int(3)
32===DONE===
33