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: SplObjectStorage addAll/removeAll --FILE-- <?php class Foo {} $storageA = n..

Decoded Output download

--TEST--
SPL: SplObjectStorage addAll/removeAll
--FILE--
<?php
class Foo {}

$storageA = new \SplObjectStorage();
$storageA->attach(new \Foo);
$storageA->attach(new \Foo);

echo ("Count storage A: " . count($storageA));
foreach ($storageA as $object) {
        echo ' x ';
}

echo "
";
$storageB = clone $storageA;

echo ("Count storage B: " . count($storageB));
foreach ($storageB as $object) {
        echo ' x ';
}
echo "
";
?>
--EXPECT--
Count storage A: 2 x  x 
Count storage B: 2 x  x 

Did this file decode correctly?

Original Code

--TEST--
SPL: SplObjectStorage addAll/removeAll
--FILE--
<?php
class Foo {}

$storageA = new \SplObjectStorage();
$storageA->attach(new \Foo);
$storageA->attach(new \Foo);

echo ("Count storage A: " . count($storageA));
foreach ($storageA as $object) {
        echo ' x ';
}

echo "\n";
$storageB = clone $storageA;

echo ("Count storage B: " . count($storageB));
foreach ($storageB as $object) {
        echo ' x ';
}
echo "\n";
?>
--EXPECT--
Count storage A: 2 x  x 
Count storage B: 2 x  x 

Function Calls

None

Variables

None

Stats

MD5 f3ee2b8a037e944dad8323dfbcbd6c88
Eval Count 0
Decode Time 95 ms