News Feed
Jobs 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

WebReference.com: User Personalization with PHP: The Final Scripts

DZone.com: Video: PHP 5.3.1, MongoDB and Lithium on Windows 7 / IIS 7

Michael Kimsal's Blog: PHP Prediction

Web Development Blog: PHP Mail Scripts using SMTP transport, a guide for beginners

Tobias Schlitt's Blog: Sending HEAD requests with ext/curl


Community Events











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


component opinion hhvm security composer install hack database overview facebook unittest performance release application introduction symfony2 language framework podcast package

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