mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
7aacc705d0
Closes GH-5958
35 lines
519 B
PHP
35 lines
519 B
PHP
--TEST--
|
|
Request #55247 (Parser problem with static calls using string method name)
|
|
--FILE--
|
|
<?php
|
|
class Test{
|
|
public static function __callStatic($method, $arguments)
|
|
{
|
|
echo $method . PHP_EOL;
|
|
}
|
|
public function __call($method, $arguments)
|
|
{
|
|
echo $method . PHP_EOL;
|
|
}
|
|
}
|
|
|
|
$method = 'method';
|
|
|
|
$test = new Test();
|
|
|
|
$test->method();
|
|
$test->$method();
|
|
$test->{'method'}();
|
|
|
|
Test::method();
|
|
Test::$method();
|
|
Test::{'method'}();
|
|
?>
|
|
--EXPECT--
|
|
method
|
|
method
|
|
method
|
|
method
|
|
method
|
|
method
|