2011-08-01 12:08:44 +00:00
|
|
|
--TEST--
|
|
|
|
Request #55247 (Parser problem with static calls using string method name)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class Test{
|
|
|
|
public static function __callStatic($method, $arguments)
|
2020-02-03 21:52:20 +00:00
|
|
|
{
|
2011-08-01 12:08:44 +00:00
|
|
|
echo $method . PHP_EOL;
|
|
|
|
}
|
2018-09-16 17:16:42 +00:00
|
|
|
public function __call($method, $arguments)
|
2020-02-03 21:52:20 +00:00
|
|
|
{
|
2011-08-01 12:08:44 +00:00
|
|
|
echo $method . PHP_EOL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$method = 'method';
|
|
|
|
|
|
|
|
$test = new Test();
|
|
|
|
|
|
|
|
$test->method();
|
|
|
|
$test->$method();
|
|
|
|
$test->{'method'}();
|
|
|
|
|
|
|
|
Test::method();
|
|
|
|
Test::$method();
|
|
|
|
Test::{'method'}();
|
2020-08-09 09:06:57 +00:00
|
|
|
?>
|
2011-08-01 12:08:44 +00:00
|
|
|
--EXPECT--
|
|
|
|
method
|
|
|
|
method
|
|
|
|
method
|
|
|
|
method
|
|
|
|
method
|
|
|
|
method
|