News Feed
Sections




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

Packt Publishing:
PHP Magic Features
April 14, 2009 @ 09:31:48

Packt Publishing has posted a new article from Jani Hartikainen about the "magic methods" that PHP comes with - methods, properties and constants really.

Magic methods, which are class methods with specific names, are used to perform various specialized tasks. They are grouped into two: overloading methods and non-overloading methods. [...] Magic functions, which are similar to magic methods, but are just plain functions outside any class. [...] Magic constants, which are similar to constants in notation, but act more like "dynamic" constants. We'll also look at some practical examples of using some of these, and lastly we'll check out what new features PHP 5.3 is going to add.

He looks at the various functions/methods and constants (like __clone, __toString), some of the overloading methods like __call, and magic constants like __FILE__ and __CLASS__. He wraps it up by briefly discussing what PHP 5.3 adds in - a few new magic methods and constants (but no functions).

0 comments voice your opinion now!
magic features php5 constant function method


blog comments powered by Disqus

Similar Posts

Lukas Smith's Blog: PHP 5.3.0 stable almost released :)

DevShed: Using Method Call Overloading in PHP 4

Content With Style: buggy behaviour of parent:: in PHP 5.3.3

Greg Beaver's Blog: phpDocumentor and __get/__set/__call - give us your ideas (RFC)

WorkingSoftware.com.au: Configuring PHP4 and PHP5 to run concurrently on FreeBSD


Community Events





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


threedevsandamaybe symfony bugfix language community voicesoftheelephpant release interview conference code series tips deployment zendserver podcast framework introduction api laravel list

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