mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
53a87547c8
* PHP-7.4: Fix leak on consteval exception in ReflectionClass::__toString()
18 lines
283 B
PHP
18 lines
283 B
PHP
--TEST--
|
|
Constant evaluation exception during ReflectionClass::__toString()
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
const C = self::UNKNOWN;
|
|
}
|
|
try {
|
|
echo new ReflectionClass(A::class);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Undefined constant self::UNKNOWN
|