1--TEST--
2Exception thrown while converting ReflectionClassConstant to string
3--FILE--
4<?php
5
6class B {
7    const X = self::UNKNOWN;
8}
9
10try {
11    echo new ReflectionClassConstant('B', 'X');
12} catch (Error $e) {
13    echo $e->getMessage(), "\n";
14}
15
16?>
17--EXPECT--
18Undefined class constant 'self::UNKNOWN'
19