1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/ext/reflection/tests/bug74454.phpt
Christoph M. Becker c0a389a927 Fix #74454: Wrong exception being thrown when using ReflectionMethod
If zend_throw_exception_ex() already threw an exception, we should not
throw again.
2018-09-05 15:05:19 +02:00

20 lines
456 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';
}
?>
===DONE===
--EXPECTF--
ParseError: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) or const (T_CONST)
===DONE===