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-- Bug #35239 (Objects can lose references) --FILE-- <?php $a = new stdClass; $a->x0..

Decoded Output download

--TEST--
Bug #35239 (Objects can lose references)
--FILE--
<?php
$a = new stdClass;
$a->x0 = new stdClass;
$a->x0->y0 = 'a';
$a->x0->y1 =& $a->x0;
$a->x0->y2 =& $a->x0;
$a->x0->y0 = 'b';
var_dump($a);
$a->x0->y1 = "ok
";
echo $a->x0;
?>
--EXPECTF--
object(stdClass)#%d (1) {
  ["x0"]=>
  &object(stdClass)#%d (3) {
    ["y0"]=>
    string(1) "b"
    ["y1"]=>
    *RECURSION*
    ["y2"]=>
    *RECURSION*
  }
}
ok

Did this file decode correctly?

Original Code

--TEST--
Bug #35239 (Objects can lose references)
--FILE--
<?php
$a = new stdClass;
$a->x0 = new stdClass;
$a->x0->y0 = 'a';
$a->x0->y1 =& $a->x0;
$a->x0->y2 =& $a->x0;
$a->x0->y0 = 'b';
var_dump($a);
$a->x0->y1 = "ok\n";
echo $a->x0;
?>
--EXPECTF--
object(stdClass)#%d (1) {
  ["x0"]=>
  &object(stdClass)#%d (3) {
    ["y0"]=>
    string(1) "b"
    ["y1"]=>
    *RECURSION*
    ["y2"]=>
    *RECURSION*
  }
}
ok

Function Calls

None

Variables

None

Stats

MD5 90cc104c61831c8ce79e8669dffdbcf8
Eval Count 0
Decode Time 160 ms