获取用户定义的类和函数的源代码?
有没有一种方法可以获取类或方法的源代码?我正在查看 ReflectionClass,但我没有看到一。
Is there a method for getting the source code of a class or method? I'm looking at the ReflectionClass, but I don't see one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能想到的最好的办法是:
编辑:这对于像这样定义的类来说效果不佳:
说这是 2 行长,而它应该只有 1 行...
Best I could come up with:
Edit: This doesn't work well with classes defined like this:
Says this is 2 lines long when it should only be 1...