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

1.1     ! misho       1: --TEST--
        !             2: ZE2 $this can be an argument to a static function
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: class TestClass
        !             7: {
        !             8:        function __construct()
        !             9:        {
        !            10:                self::Test1();
        !            11:                $this->Test1();
        !            12:        }
        !            13: 
        !            14:        static function Test1()
        !            15:        {
        !            16:                var_dump($this);
        !            17:        }
        !            18: 
        !            19:        static function Test2($this)
        !            20:        {
        !            21:                var_dump($this);
        !            22:        }
        !            23: }
        !            24: 
        !            25: $obj = new TestClass;
        !            26: TestClass::Test2(new stdClass);
        !            27: 
        !            28: ?>
        !            29: ===DONE===
        !            30: --EXPECTF--
        !            31: 
        !            32: Notice: Undefined variable: this in %sstatic_this.php on line %d
        !            33: NULL
        !            34: 
        !            35: Notice: Undefined variable: this in %sstatic_this.php on line %d
        !            36: NULL
        !            37: object(stdClass)#%d (0) {
        !            38: }
        !            39: ===DONE===

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