Annotation of embedaddon/php/ext/spl/tests/bug44615.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SPL: RecursiveArrayIterator bug 44615
! 3: --CREDITS--
! 4: Julien Pauli <doctorrock83@gmail.com>
! 5: #testfest phpcampparis 2008-06-07
! 6: --FILE--
! 7: <?php
! 8: $a = new stdClass();
! 9:
! 10: $array = array(array('z',$a),array('q','s'));
! 11:
! 12: $rai = new RecursiveArrayIterator($array,RecursiveArrayIterator::CHILD_ARRAYS_ONLY);
! 13:
! 14: foreach (new RecursiveIteratorIterator($rai) as $t) {
! 15: var_dump($t);
! 16: }
! 17: echo "Second:\n";
! 18: $rai = new RecursiveArrayIterator($array);
! 19: foreach (new RecursiveIteratorIterator($rai) as $t) {
! 20: var_dump($t);
! 21: }
! 22: ?>
! 23: --EXPECTF--
! 24: string(1) "z"
! 25: object(stdClass)#1 (0) {
! 26: }
! 27: string(1) "q"
! 28: string(1) "s"
! 29: Second:
! 30: string(1) "z"
! 31: string(1) "q"
! 32: string(1) "s"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>