bug55247.phpt 519 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Request #55247 (Parser problem with static calls using string method name)
  3. --FILE--
  4. <?php
  5. class Test{
  6. public static function __callStatic($method, $arguments)
  7. {
  8. echo $method . PHP_EOL;
  9. }
  10. public function __call($method, $arguments)
  11. {
  12. echo $method . PHP_EOL;
  13. }
  14. }
  15. $method = 'method';
  16. $test = new Test();
  17. $test->method();
  18. $test->$method();
  19. $test->{'method'}();
  20. Test::method();
  21. Test::$method();
  22. Test::{'method'}();
  23. ?>
  24. --EXPECT--
  25. method
  26. method
  27. method
  28. method
  29. method
  30. method