(PHP 8 >= 8.4.0)
ReflectionConstant::getValue — Gets value
Gets the value of the constant.
此函数没有参数。
The value of the constant.
示例 #1 ReflectionProperty::getValue() example
<?phpconst FOO = 'foo';var_dump((new \ReflectionConstant('FOO'))->getValue());?>
以上示例会输出:
string(3) "foo"