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-- GH-8080 (ReflectionClass::getConstants() depends on def. order) --FILE-- <?php cl..
Decoded Output download
--TEST--
GH-8080 (ReflectionClass::getConstants() depends on def. order)
--FILE--
<?php
class A {
const LIST = [
self::TEST => 'Test',
];
private const TEST = 'test';
}
class B extends A {}
$r = new ReflectionClass(B::class);
var_dump(
$r->getConstants(),
$r->getConstant("LIST")
);
?>
--EXPECT--
array(1) {
["LIST"]=>
array(1) {
["test"]=>
string(4) "Test"
}
}
array(1) {
["test"]=>
string(4) "Test"
}
Did this file decode correctly?
Original Code
--TEST--
GH-8080 (ReflectionClass::getConstants() depends on def. order)
--FILE--
<?php
class A {
const LIST = [
self::TEST => 'Test',
];
private const TEST = 'test';
}
class B extends A {}
$r = new ReflectionClass(B::class);
var_dump(
$r->getConstants(),
$r->getConstant("LIST")
);
?>
--EXPECT--
array(1) {
["LIST"]=>
array(1) {
["test"]=>
string(4) "Test"
}
}
array(1) {
["test"]=>
string(4) "Test"
}
Function Calls
None |
Stats
MD5 | 48598cce44321a222e4ef8c7115d6f62 |
Eval Count | 0 |
Decode Time | 87 ms |