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: FixedArray: Assigning the itself object testing the reference --FILE-- <?php..

Decoded Output download

--TEST--
SPL: FixedArray: Assigning the itself object testing the reference
--FILE--
<?php

$b = 3;
$a = new SplFixedArray($b);

$a[0] = 1;
$a[1] = 2;
$a[2] = $a;

$a[2][0] = 3;

foreach ($a as $x) {
    if (is_object($x)) {
        var_dump($x[0]);
    } else {
        var_dump($x);
    }
}

var_dump($a->getSize());

?>
--EXPECT--
int(3)
int(2)
int(3)
int(3)

Did this file decode correctly?

Original Code

--TEST--
SPL: FixedArray: Assigning the itself object testing the reference
--FILE--
<?php

$b = 3;
$a = new SplFixedArray($b);

$a[0] = 1;
$a[1] = 2;
$a[2] = $a;

$a[2][0] = 3;

foreach ($a as $x) {
    if (is_object($x)) {
        var_dump($x[0]);
    } else {
        var_dump($x);
    }
}

var_dump($a->getSize());

?>
--EXPECT--
int(3)
int(2)
int(3)
int(3)

Function Calls

None

Variables

$b 3

Stats

MD5 2cfe7ceb472c0774095bdc8659e019e8
Eval Count 0
Decode Time 105 ms