News Feed
Sections




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

Web Developer Juice:
PHP Magic Functions Best Part of Object Oriented PHP - Part 1
May 03, 2011 @ 11:57:08

On the Web Developer Juice blog there's a recent post, the first part in a series looking at one of the more handy features of the recent releases of PHP - the magic functions (some which were added in the PHP 5.x series).

There are some reserved function names in PHP class starting with __ ( double underscore ). These are __construct, __destruct, __isset, __unset, __call, __callStatic, __sleep, __wakeup, __get, __set, __toString, __set_state, __invoke and __clone. You cannot use these functions to serve your logical purpose but these are meant to be used for providing magic functionality.

They go through some of the above methods and talk about what role they can play in your code and, for some, a brief bit of code to explain how it works. This first part covers __construct/__destruct and __call/__callStatic.

0 comments voice your opinion now!
objectoriented oop magic method tutorial


blog comments powered by Disqus

Similar Posts

PHPMaster.com: Amazon DynamoDB: Store PHP Sessions with Load Balancer

Dave Marshall' Blog: Asynchronous cache priming with progress bars via Gearman, Memcache and Dojo

PHP-GTK Community Site: an IMAP Client & Screenshots with Gdk

Jose de Silva's Blog: Speeding up your application with Cache_Lite

The Bakery: Seven New Articles/Tutorials


Community Events





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


developer laravel language introduction code api version tips conference podcast list zendserver community series development release application deployment interview framework

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