php-src/ext/reflection/tests/ReflectionClassConstant_toString_error.phpt
Nikita Popov 1036fd2a70 Merge branch 'PHP-7.4'
* PHP-7.4:
  Check update constant failure in ReflectionClassConstant::__toString()
2020-08-31 14:50:40 +02:00

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