xref: /php-src/ext/spl/tests/array_016.phpt (revision f8d79582)
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--EXPECT--
22int(0)
23int(1)
24int(2)
25int(3)
26int(0)
27int(1)
28int(2)
29int(3)
30