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 #78263: Handling of self-referential array special case --FILE-- <?php // Th..

Decoded Output download

--TEST--
Bug #78263: Handling of self-referential array special case
--FILE--
<?php

// The case of a directly self-referential array is special and will
// be treated as a proper reference despite rc=1 during array copying.
$a = [&$a];
$b = [$a];
unset($a);

var_dump(ReflectionReference::fromArrayElement($b[0], 0));

?>
--EXPECT--
object(ReflectionReference)#1 (0) {
}

Did this file decode correctly?

Original Code

--TEST--
Bug #78263: Handling of self-referential array special case
--FILE--
<?php

// The case of a directly self-referential array is special and will
// be treated as a proper reference despite rc=1 during array copying.
$a = [&$a];
$b = [$a];
unset($a);

var_dump(ReflectionReference::fromArrayElement($b[0], 0));

?>
--EXPECT--
object(ReflectionReference)#1 (0) {
}

Function Calls

None

Variables

None

Stats

MD5 366869e993b64854622773137ae6eda8
Eval Count 0
Decode Time 99 ms