xref: /PHP-5.5/Zend/tests/lsb_005.phpt (revision 166266df)
1--TEST--
2ZE2 Late Static Binding stacking static calleds
3--FILE--
4<?php
5
6class 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
18class 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
26class TestC {
27	public static function test() {
28		echo get_class(new static()) . "\n";
29	}
30}
31
32class TestBB extends TestB {
33}
34
35TestA::test();
36
37?>
38==DONE==
39--EXPECTF--
40TestA
41TestB
42TestC
43TestB
44TestA
45TestC
46TestA
47TestBB
48TestC
49TestBB
50TestA
51==DONE==
52