News Feed
Sections




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

DevShed:
Implementing Property Overloading in PHP 4
July 11, 2006 @ 09:13:31

There's been a lot of fuss about the new object model in PHP5 lately, but what's a developer to do when he's stuck back in PHP4 and has no control over when things are updated? Do you just miss out on some of those cool features? Well, you may not have access to what PHP5-ers do, but PHP4 still has some cool tricks up its sleeve. One of which is property overloading, and it's covered in this new article from DevShed.

In these articles, I'll explain the basics of class overloading, starting with the application of the "overload()" function in PHP 4, in conjunction with using the "_set()", "__get()" and "__call()" methods, accompanied of several practical examples, so you'll have a clear idea of how to overload your classes. Also, I'll cover class overloading in PHP 5, which offers native support for overloading methods and properties through the built-in methods that I mentioned before.

This first part of the series lays down the groundwork of overloading, touching briefly on its uses before moving onto some of the functionality - the __set method, overload function, and __get method - to make a simple "cookie saver" application.

1 comment voice your opinion now!
overload php4 php5 property __set __get tutorial overload php4 php5 property __set __get tutorial


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Creating Template-Based Applications with HTML_Template_Flexy

NetTus.com: Understanding PhpSpec

DevShed: Working with Multiple Document Nodes with the DOM XML Extension in PHP 5

Internet Super Hero Blog: mysqlnd to support PDO, mysqlnd in PHP 5.3

Anthony Ferrara: Programming With Anthony - Logic


Community Events





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


framework deployment opinion community voicesoftheelephpant library bugfix release language introduction laravel package list podcast interview symfony api tips series install

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