dimanche 25 mars 2018

is there a way to get the code lines for a PHP ReflectionProperty?

PHP's ReflectionFunction has methods that tell you what line it starts and ends on, so you can with a bit of string manipulation load the code file and get its source code.

ReflectionProperty does not have any similar methods. It has a __string() magic method, but that doesn't return source code.

Is there any way to get the source code for a class property?





Aucun commentaire:

Enregistrer un commentaire