News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
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




Similar Posts

Greg Beaver's Blog: PhpDocumentor 1.3.0 stable is released

Christian Wenz's Blog: Zeev on PHP

SitePoint PHP Blog: How to Expose PHP's Private Parts

SitePoint.com: Create Dynamic Images with ImageMagick

Felix Geisendörfer's Blog: How to Plugin'ize Your App


Community Events











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


framework application book ajax security job conference zendframework code zend releases example PHP5 release mysql PEAR database cakephp developer package

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