Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
PHP 5's Reflection API is to PHP what the java.lang.reflect package is to Java. It consists of built-in classes for analyzing properties, methods, and classes. It's similar in some respects to existing object functions, such as get_class_vars(), but is more flexible and provides much greater detail. It's also designed to work with PHP's object-oriented features, such as access control, interfaces, and abstract classes, in a way that the older, more limited class functions are not.
The Reflection API can be used to examine more than just classes. For example, the ReflectionFunction class provides information about a given function, and ReflectionExtension yields insight about an extension compiled into the language. Table 5-1 lists some of the classes in the API.