Similarly to software programming languages as Java and C#, PHP also allows us to write code that finds information about objects and classes. Whether the class was already known during the development phase or was created afterwards, using reflection we can get detailed information about the class and even invoke its methods or access its fields.

This capability is of a special interest for those who develop complex server side applications and frameworks that can be extended through code developed by others.

The following video clips overview some of the reflection capabilities in PHP. You can find the source code in my PHP Fundamentals course. Its community version is available for free personal usage at www.abelski.com.

Leave a Reply

Your email address will not be published. Required fields are marked *