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

1.1     ! misho       1: --TEST--
        !             2: ReflectionClass::getName()
        !             3: --FILE--
        !             4: <?php
        !             5: class TrickClass {
        !             6:        function __toString() {
        !             7:                //Return the name of another class
        !             8:                return "Exception";
        !             9:        }
        !            10: }
        !            11: 
        !            12: $r1 = new ReflectionClass("stdClass");
        !            13: 
        !            14: $myInstance = new stdClass;
        !            15: $r2 = new ReflectionClass($myInstance);
        !            16: 
        !            17: $r3 = new ReflectionClass("TrickClass");
        !            18: 
        !            19: var_dump($r1->getName(), $r2->getName(), $r3->getName());
        !            20: 
        !            21: ?> 
        !            22: --EXPECTF--
        !            23: string(8) "stdClass"
        !            24: string(8) "stdClass"
        !            25: string(10) "TrickClass"

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