mirror of
https://github.com/php/php-src.git
synced 2024-10-03 07:46:12 +00:00
fac1e87171
constants with self::. - Reflown some NEWS entries to have lines no longer than 80 chars.
29 lines
410 B
PHP
29 lines
410 B
PHP
--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
|