1--TEST--
2Indirect call with empty class and/or method name.
3--FILE--
4<?php
5class TestClass
6{
7    public static function __callStatic($method, array $args)
8    {
9        var_dump($method);
10    }
11}
12
13// Test call using array syntax
14$callback = ['TestClass', ''];
15$callback();
16
17// Test call using Class::method syntax.
18$callback = 'TestClass::';
19$callback();
20
21// Test array syntax with empty class name
22$callback = ['', 'method'];
23try {
24    $callback();
25} catch (Error $e) {
26    echo $e->getMessage() . "\n";
27}
28
29// Test Class::method syntax with empty class name
30$callback = '::method';
31try {
32    $callback();
33} catch (Error $e) {
34    echo $e->getMessage() . "\n";
35}
36
37// Test array syntax with empty class and method name
38$callback = ['', ''];
39try {
40    $callback();
41} catch (Error $e) {
42    echo $e->getMessage() . "\n";
43}
44
45// Test Class::method syntax with empty class and method name
46$callback = '::';
47try {
48    $callback();
49} catch (Error $e) {
50    echo $e->getMessage() . "\n";
51}
52
53// Test string ending in single colon
54$callback = 'Class:';
55try {
56    $callback();
57} catch (Error $e) {
58    echo $e->getMessage() . "\n";
59}
60
61// Test string beginning in single colon
62$callback = ':method';
63try {
64    $callback();
65} catch (Error $e) {
66    echo $e->getMessage() . "\n";
67}
68
69// Test single colon
70$callback = ':';
71try {
72    $callback();
73} catch (Error $e) {
74    echo $e->getMessage() . "\n";
75}
76?>
77--EXPECT--
78string(0) ""
79string(0) ""
80Class '' not found
81Class '' not found
82Class '' not found
83Class '' not found
84Call to undefined function Class:()
85Call to undefined function :method()
86Call to undefined function :()
87