1--TEST-- 2Constant evaluation exception during ReflectionClass::__toString() 3--FILE-- 4<?php 5 6class A { 7 const C = self::UNKNOWN; 8} 9try { 10 echo new ReflectionClass(A::class); 11} catch (Error $e) { 12 echo $e->getMessage(), "\n"; 13} 14 15?> 16--EXPECT-- 17Undefined constant self::UNKNOWN 18