php-8.0.30-src/ext/reflection/tests/ReflectionClassConstant_toS...

19 lines
293 B
PHP

--TEST--
Exception thrown while converting ReflectionClassConstant to string
--FILE--
<?php
class B {
const X = self::UNKNOWN;
}
try {
echo new ReflectionClassConstant('B', 'X');
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Undefined constant self::UNKNOWN