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: Error: iterator_apply when the callback throws an exception --FILE-- <?php ..

Decoded Output download

--TEST--
SPL: Error: iterator_apply when the callback throws an exception
--FILE--
<?php

function test() {
    throw new Exception('Broken callback');
}

$it = new RecursiveArrayIterator(array(1, 21, 22));

try {
    iterator_apply($it, 'test');
} catch (Exception $e) {
    echo $e->getMessage();
}

?>
--EXPECT--
Broken callback

Did this file decode correctly?

Original Code

--TEST--
SPL: Error: iterator_apply when the callback throws an exception
--FILE--
<?php

function test() {
    throw new Exception('Broken callback');
}

$it = new RecursiveArrayIterator(array(1, 21, 22));

try {
    iterator_apply($it, 'test');
} catch (Exception $e) {
    echo $e->getMessage();
}

?>
--EXPECT--
Broken callback

Function Calls

None

Variables

None

Stats

MD5 b3f9953af9915d4aeec1fa31df192dc9
Eval Count 0
Decode Time 90 ms