(PHP 8 >= 8.4.0)
ReflectionConstant::getValue — Gets value
Questa funzione non contiene parametri.
The value of the constant.
Example #1 ReflectionProperty::getValue() example
<?php
const FOO = 'foo';
var_dump((new \ReflectionConstant('FOO'))->getValue());
?>
Il precedente esempio visualizzerà:
string(3) "foo"