Reflection in PHP PRO

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.

Share:

The Visitor Design Pattern

The Visitor Design Pattern

The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences