Annotation of embedaddon/php/tests/classes/constants_basic_003.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Ensure class properties and constants can be defined in terms of constants that are not known at compile time.
        !             3: --FILE--
        !             4: <?php
        !             5:   include 'constants_basic_003.inc';
        !             6:   class B
        !             7:   {
        !             8:       public static $a = A::MY_CONST;
        !             9:       public static $c = C::MY_CONST;
        !            10:       const ca = A::MY_CONST;
        !            11:       const cc = C::MY_CONST;
        !            12:   }
        !            13:   
        !            14:   class C
        !            15:   {
        !            16:       const MY_CONST = "hello from C";
        !            17:   }
        !            18:   
        !            19:   var_dump(B::$a);
        !            20:   var_dump(B::$c);
        !            21:   var_dump(B::ca);
        !            22:   var_dump(B::cc);
        !            23: ?>
        !            24: --EXPECTF--
        !            25: string(12) "hello from A"
        !            26: string(12) "hello from C"
        !            27: string(12) "hello from A"
        !            28: string(12) "hello from C"

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