php-src/ext/reflection/tests/ReflectionClass_toString_004.phpt
Nikita Popov 53a87547c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix leak on consteval exception in ReflectionClass::__toString()
2020-08-31 15:10:53 +02:00

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