/hphp/test/zend/good/ext/reflection/tests/bug53915.php
PHP | 21 lines | 18 code | 3 blank | 0 comment | 0 complexity | 781ec269aa9a70fca2d4f40a9cfaeeb3 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?hh
- class Foo
- {
- const A = 1;
- const B = self::A;
- }
- class Foo2
- {
- const A = 1;
- const B = self::A;
- }
- <<__EntryPoint>>
- function main_entry(): void {
- $rc = new ReflectionClass('Foo');
- print_r($rc->getConstants());
- $rc = new ReflectionClass('Foo2');
- print_r($rc->getConstant('B'));
- }