xref: /PHP-8.2/Zend/tests/lsb_022.phpt (revision ee510eed)
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?>
27--EXPECTF--
28Deprecated: Use of "static" in callables is deprecated in %s on line %d
29B
30
31Deprecated: Use of "parent" in callables is deprecated in %s on line %d
32
33Deprecated: Use of "static" in callables is deprecated in %s on line %d
34B
35
36Deprecated: Use of "static" in callables is deprecated in %s on line %d
37B
38
39Deprecated: Use of "parent" in callables is deprecated in %s on line %d
40
41Deprecated: Use of "static" in callables is deprecated in %s on line %d
42B
43
44Deprecated: Use of "parent" in callables is deprecated in %s on line %d
45
46Deprecated: Use of "static" in callables is deprecated in %s on line %d
47B
48