blob: f2f2ae56759d0be52c3353006f1df34d624f7532 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--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
|