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-- RecursiveIteratorIterator constructor should thrown if IteratorAggregate does not..
Decoded Output download
--TEST--
RecursiveIteratorIterator constructor should thrown if IteratorAggregate does not return Iterator
--FILE--
<?php
class MyIteratorAggregate implements IteratorAggregate {
#[ReturnTypeWillChange]
function getIterator() {
return null;
}
}
try {
new RecursiveIteratorIterator(new MyIteratorAggregate);
} catch (LogicException $e) {
echo $e->getMessage(), "
";
}
?>
--EXPECT--
MyIteratorAggregate::getIterator() must return an object that implements Traversable
Did this file decode correctly?
Original Code
--TEST--
RecursiveIteratorIterator constructor should thrown if IteratorAggregate does not return Iterator
--FILE--
<?php
class MyIteratorAggregate implements IteratorAggregate {
#[ReturnTypeWillChange]
function getIterator() {
return null;
}
}
try {
new RecursiveIteratorIterator(new MyIteratorAggregate);
} catch (LogicException $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
MyIteratorAggregate::getIterator() must return an object that implements Traversable
Function Calls
None |
Stats
MD5 | 860f627c93fcc233bff82cce4cd100c4 |
Eval Count | 0 |
Decode Time | 97 ms |