Annotation of embedaddon/php/Zend/tests/get_class_vars_002.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: get_class_vars(): Testing the scope
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: class A {
        !             7:        public $a = 1;
        !             8:        private $b = 2;
        !             9:        private $c = 3;
        !            10: }
        !            11: 
        !            12: class B extends A {
        !            13:        static public $aa = 4;
        !            14:        static private $bb = 5;
        !            15:        static protected $cc = 6;
        !            16: }
        !            17: 
        !            18: class C extends B {
        !            19:        public function __construct() {
        !            20:                var_dump(get_class_vars('A'));
        !            21:                var_dump(get_class_vars('B'));
        !            22:                
        !            23:                var_dump($this->a, $this->b, $this->c);
        !            24:        }       
        !            25: }
        !            26: 
        !            27: new C;
        !            28: 
        !            29: ?>
        !            30: --EXPECTF--
        !            31: array(1) {
        !            32:   ["a"]=>
        !            33:   int(1)
        !            34: }
        !            35: array(3) {
        !            36:   ["a"]=>
        !            37:   int(1)
        !            38:   ["aa"]=>
        !            39:   int(4)
        !            40:   ["cc"]=>
        !            41:   int(6)
        !            42: }
        !            43: 
        !            44: Notice: Undefined property: C::$b in %s on line %d
        !            45: 
        !            46: Notice: Undefined property: C::$c in %s on line %d
        !            47: int(1)
        !            48: NULL
        !            49: NULL

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