xref: /PHP-8.2/Zend/tests/lsb_017.phpt (revision f8d79582)
1--TEST--
2ZE2 Late Static Binding nested calls
3--FILE--
4<?php
5class 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
14class B extends A {
15}
16class C extends A {
17}
18class D extends A {
19}
20
21echo A::test(B::test(C::test(D::test())))."\n";
22?>
23--EXPECT--
24D
25C
26B
27A
28