CHAPTER 7Reflection API
Reflection is one of the most powerful and perhaps one of the most underused features of the PHP language. If you're tasked with building complex, extensible applications, it's well worth your time to understand this powerful feature. Reflection can facilitate otherwise tedious and complicated tasks, such as autoloading plug-ins, automating documentation, and even extending the PHP language itself.
How can one feature offer such a wide array of capabilities? PHP's reflection API consists of a series of classes that allow you to access program metadata and interact with associated code comments. This gives you the ability to determine, for example, what methods a class implements. With this capability, you can create applications ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access