summaryrefslogtreecommitdiff
path: root/Zend/tests/lsb_017.phpt
blob: 5088eee7bbe6565de18e49fdc8176801197d45f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
ZE2 Late Static Binding nested calls
--FILE--
<?php
class A {
    public static function test($x=null) {
        if (!is_null($x)) {
            echo "$x\n";
        }
        return get_called_class();
    }
}

class B extends A {
}
class C extends A {
}
class D extends A {
}

echo A::test(B::test(C::test(D::test())))."\n";
?>
--EXPECT--
D
C
B
A