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

1.1       misho       1: --TEST--
                      2: ZE2 Late Static Binding nested calls
                      3: --FILE--
                      4: <?php
                      5: class A {
                      6:        public static function test($x=null) {
                      7:                if (!is_null($x)) {
                      8:                        echo "$x\n";
                      9:                }
                     10:                return get_called_class();
                     11:        }
                     12: }
                     13: 
                     14: class B extends A {
                     15: }
                     16: class C extends A {
                     17: }
                     18: class D extends A {
                     19: }
                     20: 
                     21: echo A::test(B::test(C::test(D::test())))."\n";
                     22: ?>
                     23: ==DONE==
                     24: --EXPECT--
                     25: D
                     26: C
                     27: B
                     28: A
                     29: ==DONE==

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