News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Introspection and Reflection in PHP
May 25, 2012 @ 14:03:57

On PHPMaster.com today there's an introduction to Reflection, a feature of PHP that allows you to peer into the code itself and find out metadata like class properties, scope levels and parent classes.

PHP introspection is a common feature in any programming language which allows object classes to be manipulated by the programmer. You'll find introspection particularly useful when you don't know which class or method you need to execute at design time. [...] During this article, you'll see a couple examples of how to use some of the most useful PHP's introspection function and a section dedicated to an API that offers functionality similar to introspection, the Reflection API.

They introduce you to a few different methods including class_exists, get_class and get_class_vars and method_exists. They also briefly mention the "ReflectionClass" that's a part of the PHP Reflection API and how it can be used to make an instance pointing to a current class.

0 comments voice your opinion now!
introspection reflection tutorial api metadata


blog comments powered by Disqus

Similar Posts

Stefan Koopmanschap's Blog: Introducing phpOpenNOS

Gonzalo Ayuso: Integrating WebSockets with PHP applications. Silex and socket.io playing together.

PHPMaster.com: Data Structures for PHP Devs: Trees

ServerGrove Blog: Spooling emails with Symfony2 on VPS and Shared Hosting

Raphael Stolt's Blog: Installing Zend_Tool on Mac OS X


Community Events

Don't see your event here?
Let us know!


community wordpress opinion interview api laravel5 php7 framework podcast unittest release voicesoftheelephpant introduction laravel list version series extension language library

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework