(PHP 8 >= 8.4.0)
ReflectionConstant::getValue — 获取值
获取常量的值。
此函数没有参数。
常量的值。
示例 #1 ReflectionProperty::getValue() 示例
<?phpconst FOO = 'foo';var_dump((new \ReflectionConstant('FOO'))->getValue());?>
以上示例将输出
string(3) "foo"