xref: /PHP-5.6/Zend/tests/lsb_022.phpt (revision 610c7fbe)
1--TEST--
2ZE2 Late Static Binding parent::/self:: forwarding and __callStatic
3--FILE--
4<?php
5class A {
6	static function test() {
7		echo "A\n";
8	}
9	static function __callstatic($name, $args) {
10		call_user_func("static::test");
11	}
12}
13class B extends A {
14	static function test() {
15	  	echo "B\n";
16	}
17	static function __callstatic($name, $args) {
18		parent::__callstatic($name, $args);
19		call_user_func_array("parent::__callstatic", array($name, $args));
20		parent::foo();
21		call_user_func_array("parent::foo", $args);
22		call_user_func_array(array("parent","foo"), $args);
23	}
24}
25B::foo();
26--EXPECT--
27B
28B
29B
30B
31B
32