blob: 24df1d186a4359e2399bbcd885d7a6157271e994 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
Testing Closure::fromCallable() functionality: Getting non-static method statically
--FILE--
<?php
class A {
public function method() {
}
}
try {
$fn = Closure::fromCallable(['A', 'method']);
$fn();
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Failed to create closure from callable: non-static method A::method() cannot be called statically
|