summaryrefslogtreecommitdiff
path: root/Zend/tests/lsb_017.phpt
blob: 5f5ca4351fd259348c46cefc55b5010674244076 (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
28
29
--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";
?>
==DONE==
--EXPECT--
D
C
B
A
==DONE==