Annotation of embedaddon/php/ext/reflection/tests/bug38653.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #38653 (memory leak in ReflectionClass::getConstant())
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: class foo {
        !             7:            const cons = 10;
        !             8:            const cons1 = "";
        !             9:            const cons2 = "test";
        !            10: }
        !            11: 
        !            12: class bar extends foo {
        !            13: }
        !            14: 
        !            15: $foo = new ReflectionClass("foo");
        !            16: var_dump($foo->getConstant("cons"));
        !            17: var_dump($foo->getConstant("cons1"));
        !            18: var_dump($foo->getConstant("cons2"));
        !            19: var_dump($foo->getConstant("no such const"));
        !            20: 
        !            21: echo "Done\n";
        !            22: ?>
        !            23: --EXPECTF--    
        !            24: int(10)
        !            25: string(0) ""
        !            26: string(4) "test"
        !            27: bool(false)
        !            28: Done

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