Skip to content

Commit

Permalink
Add tests from testfest
Browse files Browse the repository at this point in the history
  • Loading branch information
colder committed Jun 12, 2008
1 parent c26c072 commit ee81b5a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ext/spl/tests/bug44615.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--TEST--
SPL: RecursiveArrayIterator bug 44615
--CREDITS--
Julien Pauli <doctorrock83@gmail.com>
#testfest phpcampparis 2008-06-07
--FILE--
<?php
$a = new stdClass();

$array = array(array('z',$a),array('q','s'));

$rai = new RecursiveArrayIterator($array,RecursiveArrayIterator::CHILD_ARRAYS_ONLY);

foreach (new RecursiveIteratorIterator($rai) as $t) {
var_dump($t);
}
echo "Second:\n";
$rai = new RecursiveArrayIterator($array);
foreach (new RecursiveIteratorIterator($rai) as $t) {
var_dump($t);
}
?>
--EXPECTF--
string(1) "z"
object(stdClass)#1 (0) {
}
string(1) "q"
string(1) "s"
Second:
string(1) "z"
string(1) "q"
string(1) "s"

0 comments on commit ee81b5a

Please sign in to comment.