mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Second pass through `Zend/tests/bug*` to organize the tests. Move tests to existing sub directories, and create some new sub directories: * `ArrayAccess` * `autoload` * `clone` * `serialize` (also covers `unserialize()`) * `switch` Work towards GH-15631
25 lines
475 B
PHP
25 lines
475 B
PHP
--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
|