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-- Check that SplObjectStorage::current() throws when iterator invalid --CREDITS-- P..

Decoded Output download

--TEST--
Check that SplObjectStorage::current() throws when iterator invalid
--CREDITS--
PHPNW Testfest 2009 - Simon Westcott ([email protected])
--FILE--
<?php

$s = new SplObjectStorage();

var_dump($s->valid());
try {
    var_dump($s->current());
} catch (RuntimeException $e) {
    echo $e->getMessage(), "
";
}

?>
--EXPECT--
bool(false)
Called current() on invalid iterator

Did this file decode correctly?

Original Code

--TEST--
Check that SplObjectStorage::current() throws when iterator invalid
--CREDITS--
PHPNW Testfest 2009 - Simon Westcott ([email protected])
--FILE--
<?php

$s = new SplObjectStorage();

var_dump($s->valid());
try {
    var_dump($s->current());
} catch (RuntimeException $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
bool(false)
Called current() on invalid iterator

Function Calls

None

Variables

None

Stats

MD5 7b5381c6121110ff0317eac46fdb1949
Eval Count 0
Decode Time 78 ms