blob: 9e0332d89388fb1e877051c518e0d2c0da5f5f18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--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';
}
?>
===DONE===
--EXPECT--
ParseError: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) or const (T_CONST)
===DONE===
|