blob: d453d73d26c1de6a17ab2bdb67d3bc46a482e699 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--TEST--
Bug #61025 (__invoke() visibility not honored)
--FILE--
<?php
class Bar {
private function __invoke() {
return __CLASS__;
}
}
$b = new Bar;
echo $b();
echo $b->__invoke();
?>
--EXPECTF--
Warning: The magic method Bar::__invoke() must have public visibility in %sbug61025.php on line %d
Bar
Fatal error: Uncaught Error: Call to private method Bar::__invoke() from global scope in %s:%d
Stack trace:
#0 {main}
thrown in %sbug61025.php on line %d
|