bug74454.phpt 422 B

1234567891011121314151617
  1. --TEST--
  2. Bug #74454 (Wrong exception being thrown when using ReflectionMethod)
  3. --FILE--
  4. <?php
  5. spl_autoload_register('load_file');
  6. try {
  7. $x = new ReflectionMethod('A', 'b');
  8. } catch (\Throwable $e) {
  9. echo get_class($e), ': ', $e->getMessage(), PHP_EOL;
  10. }
  11. function load_file() {
  12. require __DIR__ . '/bug74454.inc';
  13. }
  14. ?>
  15. --EXPECT--
  16. ParseError: syntax error, unexpected token "if", expecting "function" or "const"