1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/reflection/tests/bug74454.phpt
Ilija Tovilo adfdfb2e1e Improvements in modifier parsing (#9926)
Use a shared non-terminal for all class modifiers. This avoids conflicts when
adding modifiers that are only valid for certain targets. This change is
necessary for asymmetric visibility but might be useful for other future
additions.

Closes GH-9926
2022-11-17 16:20:27 +01:00

18 lines
411 B
PHP

--TEST--
Bug #74454 (Wrong exception being thrown when using ReflectionMethod)
--FILE--
<?php
spl_autoload_register('load_file');
try {
$x = new ReflectionMethod('A', 'b');
} catch (\Throwable $e) {
echo get_class($e), ': ', $e->getMessage(), PHP_EOL;
}
function load_file() {
require __DIR__ . '/bug74454.inc';
}
?>
--EXPECT--
ParseError: syntax error, unexpected token "if", expecting "function"