1--TEST--
2Trying to acquire callable to something that's not callable
3--FILE--
4<?php
5
6class Test {
7    private static function privateMethod() {}
8
9    public function instanceMethod() {}
10}
11
12try {
13    $fn = 123;
14    $fn(...);
15} catch (Error $e) {
16    echo $e->getMessage(), "\n";
17}
18try {
19    does_not_exist(...);
20} catch (Error $e) {
21    echo $e->getMessage(), "\n";
22}
23try {
24    stdClass::doesNotExist(...);
25} catch (Error $e) {
26    echo $e->getMessage(), "\n";
27}
28try {
29    (new stdClass)->doesNotExist(...);
30} catch (Error $e) {
31    echo $e->getMessage(), "\n";
32}
33try {
34    [new stdClass, 'doesNotExist'](...);
35} catch (Error $e) {
36    echo $e->getMessage(), "\n";
37}
38try {
39    Test::privateMethod(...);
40} catch (Error $e) {
41    echo $e->getMessage(), "\n";
42}
43try {
44    Test::instanceMethod(...);
45} catch (Error $e) {
46    echo $e->getMessage(), "\n";
47}
48
49?>
50--EXPECT--
51Value of type int is not callable
52Call to undefined function does_not_exist()
53Call to undefined method stdClass::doesNotExist()
54Call to undefined method stdClass::doesNotExist()
55Call to undefined method stdClass::doesNotExist()
56Call to private method Test::privateMethod() from global scope
57Non-static method Test::instanceMethod() cannot be called statically
58