Annotation of embedaddon/php/ext/spl/tests/iterator_033.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SPL: ParentIterator
! 3: --FILE--
! 4: <?php
! 5:
! 6: $it = new ParentIterator(new RecursiveArrayIterator(array(1,array(21,22, array(231)),3)));
! 7:
! 8: foreach(new RecursiveIteratorIterator($it) as $k=>$v)
! 9: {
! 10: var_dump($k);
! 11: var_dump($v);
! 12: }
! 13:
! 14: echo "==SECOND==\n";
! 15:
! 16: foreach(new RecursiveIteratorIterator($it, 1) as $k=>$v)
! 17: {
! 18: var_dump($k);
! 19: var_dump($v);
! 20: }
! 21:
! 22: ?>
! 23: ===DONE===
! 24: <?php exit(0); ?>
! 25: --EXPECT--
! 26: ==SECOND==
! 27: int(1)
! 28: array(3) {
! 29: [0]=>
! 30: int(21)
! 31: [1]=>
! 32: int(22)
! 33: [2]=>
! 34: array(1) {
! 35: [0]=>
! 36: int(231)
! 37: }
! 38: }
! 39: int(2)
! 40: array(1) {
! 41: [0]=>
! 42: int(231)
! 43: }
! 44: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>