Since PHP 7.1, they introduced const visibility, and I need to read it thorugh reflection. I went as far as creating my ReflectionClass like this:
$rc = new ReflectionClass(static::class);
The function getConstants() returns a name/value map and getConstant($name) just its value. Both doesn't return visibility information. Shouldn't there be a ReflectionConst class similarly to functions, properties, etc.?
Is there any other way to obtain this information?
Aucun commentaire:
Enregistrer un commentaire