Annotation of embedaddon/php/Zend/tests/lsb_005.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: ZE2 Late Static Binding stacking static calleds
                      3: --FILE--
                      4: <?php
                      5: 
                      6: class TestA {
                      7:        public static function test() {
                      8:                echo get_class(new static()) . "\n";
                      9:                TestB::test();
                     10:                echo get_class(new static()) . "\n";
                     11:                TestC::test();
                     12:                echo get_class(new static()) . "\n";
                     13:                TestBB::test();
                     14:                echo get_class(new static()) . "\n";
                     15:        }
                     16: }
                     17: 
                     18: class TestB {
                     19:        public static function test() {
                     20:                echo get_class(new static()) . "\n";
                     21:                TestC::test();
                     22:                echo get_class(new static()) . "\n";
                     23:        }
                     24: }
                     25: 
                     26: class TestC {
                     27:        public static function test() {
                     28:                echo get_class(new static()) . "\n";
                     29:        }
                     30: }
                     31: 
                     32: class TestBB extends TestB {
                     33: }
                     34: 
                     35: TestA::test();
                     36: 
                     37: ?>
                     38: ==DONE==
                     39: --EXPECTF--
                     40: TestA
                     41: TestB
                     42: TestC
                     43: TestB
                     44: TestA
                     45: TestC
                     46: TestA
                     47: TestBB
                     48: TestC
                     49: TestBB
                     50: TestA
                     51: ==DONE==

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