1--TEST--
2forward_static_call() called from outside of a method.
3--FILE--
4<?php
5
6class A
7{
8    const NAME = 'A';
9    public static function test() {
10        echo static::NAME, "\n";
11    }
12}
13
14class B extends A
15{
16    const NAME = 'B';
17
18    public static function test() {
19        echo self::NAME, "\n";
20        forward_static_call(array('parent', 'test'));
21    }
22
23    public static function test2() {
24        echo self::NAME, "\n";
25        forward_static_call(array('self', 'test'));
26    }
27
28    public static function test3() {
29        echo self::NAME, "\n";
30        forward_static_call(array('A', 'test'));
31    }
32}
33
34class C extends B
35{
36    const NAME = 'C';
37
38    public static function test()
39    {
40        echo self::NAME, "\n";
41        forward_static_call(array('A', 'test'));
42    }
43}
44
45A::test();
46echo "-\n";
47B::test();
48echo "-\n";
49B::test2();
50echo "-\n";
51B::test3();
52echo "-\n";
53C::test();
54echo "-\n";
55C::test2();
56echo "-\n";
57C::test3();
58
59?>
60--EXPECTF--
61A
62-
63B
64
65Deprecated: Use of "parent" in callables is deprecated in %s on line %d
66B
67-
68B
69
70Deprecated: Use of "self" in callables is deprecated in %s on line %d
71B
72
73Deprecated: Use of "parent" in callables is deprecated in %s on line %d
74B
75-
76B
77B
78-
79C
80C
81-
82B
83
84Deprecated: Use of "self" in callables is deprecated in %s on line %d
85B
86
87Deprecated: Use of "parent" in callables is deprecated in %s on line %d
88C
89-
90B
91C
92