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

时间:2018-03-25 20:44:24

标签: php reflection

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?

0 个答案:

没有答案