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 #53915 - ReflectionClass::getConstant(s) emits fatal error on selfreferencing..
Decoded Output download
--TEST--
Bug #53915 - ReflectionClass::getConstant(s) emits fatal error on selfreferencing constants
--FILE--
<?php
Class Foo
{
const A = 1;
const B = self::A;
}
$rc = new ReflectionClass('Foo');
print_r($rc->getConstants());
Class Foo2
{
const A = 1;
const B = self::A;
}
$rc = new ReflectionClass('Foo2');
print_r($rc->getConstant('B'));
?>
--EXPECT--
Array
(
[A] => 1
[B] => 1
)
1
Did this file decode correctly?
Original Code
--TEST--
Bug #53915 - ReflectionClass::getConstant(s) emits fatal error on selfreferencing constants
--FILE--
<?php
Class Foo
{
const A = 1;
const B = self::A;
}
$rc = new ReflectionClass('Foo');
print_r($rc->getConstants());
Class Foo2
{
const A = 1;
const B = self::A;
}
$rc = new ReflectionClass('Foo2');
print_r($rc->getConstant('B'));
?>
--EXPECT--
Array
(
[A] => 1
[B] => 1
)
1
Function Calls
None |
Stats
MD5 | 6ac9aa79dbeb2f1375d9bcfc9ca5799e |
Eval Count | 0 |
Decode Time | 81 ms |