Annotation of embedaddon/php/ext/reflection/tests/bug53915.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #53915 - ReflectionClass::getConstant(s) emits fatal error on selfreferencing constants
                      3: --FILE--
                      4: <?php
                      5: Class Foo
                      6: {
                      7:        const A = 1;
                      8:        const B = self::A;
                      9: }
                     10: 
                     11: $rc = new ReflectionClass('Foo');
                     12: print_r($rc->getConstants());
                     13: 
                     14: Class Foo2
                     15: {
                     16:         const A = 1;
                     17:         const B = self::A;
                     18: }
                     19: 
                     20: $rc = new ReflectionClass('Foo2');
                     21: print_r($rc->getConstant('B'));
                     22: --EXPECT--
                     23: Array
                     24: (
                     25:     [A] => 1
                     26:     [B] => 1
                     27: )
                     28: 1

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>