Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- SPL: RecursiveArrayIterator bug 44615 --CREDITS-- Julien Pauli <doctorrock83@gmai..

Decoded Output download

--TEST--
SPL: RecursiveArrayIterator bug 44615
--CREDITS--
Julien Pauli <[email protected]>
#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:
";
$rai = new RecursiveArrayIterator($array);
foreach (new RecursiveIteratorIterator($rai) as $t) {
    var_dump($t);
}
?>
--EXPECT--
string(1) "z"
object(stdClass)#1 (0) {
}
string(1) "q"
string(1) "s"
Second:
string(1) "z"
string(1) "q"
string(1) "s"

Did this file decode correctly?

Original Code

--TEST--
SPL: RecursiveArrayIterator bug 44615
--CREDITS--
Julien Pauli <[email protected]>
#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);
}
?>
--EXPECT--
string(1) "z"
object(stdClass)#1 (0) {
}
string(1) "q"
string(1) "s"
Second:
string(1) "z"
string(1) "q"
string(1) "s"

Function Calls

None

Variables

None

Stats

MD5 88e873e7b287db1a326ed81c91b84e9a
Eval Count 0
Decode Time 86 ms