(PHP 8 >= 8.4.0)
ReflectionConstant::getValue — 取得值
取得常數的值。
此函式沒有參數。
常數的值。
範例 #1 ReflectionProperty::getValue() 範例
<?phpconst FOO = 'foo';var_dump((new \ReflectionConstant('FOO'))->getValue());?>
以上範例會輸出:
string(3) "foo"