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: IteratorInterator constructor checks --CREDITS-- Sean Burlington www.practic..

Decoded Output download

--TEST--
SPL: IteratorInterator constructor checks
--CREDITS--
Sean Burlington www.practicalweb.co.uk
TestFest London May 2009
--FILE--
<?php

$array = array(array(7,8,9),1,2,3,array(4,5,6));
$arrayIterator = new ArrayIterator($array);
try {
    $test = new IteratorIterator($arrayIterator);

    $test = new IteratorIterator($arrayIterator, 1);
    $test = new IteratorIterator($arrayIterator, 1, 1);
    $test = new IteratorIterator($arrayIterator, 1, 1, 1);
    $test = new IteratorIterator($arrayIterator, 1, 1, 1, 1);
} catch (TypeError $e){
  echo $e->getMessage() . "
";
}

?>
--EXPECT--
IteratorIterator::__construct() expects at most 2 arguments, 3 given

Did this file decode correctly?

Original Code

--TEST--
SPL: IteratorInterator constructor checks
--CREDITS--
Sean Burlington www.practicalweb.co.uk
TestFest London May 2009
--FILE--
<?php

$array = array(array(7,8,9),1,2,3,array(4,5,6));
$arrayIterator = new ArrayIterator($array);
try {
    $test = new IteratorIterator($arrayIterator);

    $test = new IteratorIterator($arrayIterator, 1);
    $test = new IteratorIterator($arrayIterator, 1, 1);
    $test = new IteratorIterator($arrayIterator, 1, 1, 1);
    $test = new IteratorIterator($arrayIterator, 1, 1, 1, 1);
} catch (TypeError $e){
  echo $e->getMessage() . "\n";
}

?>
--EXPECT--
IteratorIterator::__construct() expects at most 2 arguments, 3 given

Function Calls

None

Variables

$array [{'key': 0, 'value': [{'key': 0, 'value': 7}, {'key': 1, 'value': 8}, {'key': 2, 'value': 9}]}, {'key': 1, 'value': 1}, {'key': 2, 'value': 2}, {'key': 3, 'value': 3}, {'key': 4, 'value': [{'key': 0, 'value': 4}, {'key': 1, 'value': 5}, {'key': 2, 'value': 6}]}]

Stats

MD5 6c11973bc0f9275b7a3e6a160f8ef4ac
Eval Count 0
Decode Time 87 ms