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

DevShed: Using Yahoo! Web Services with PHP 5

Jeremy Cook's Blog: Implementing IteratorAggregate and Iterator

ZendCasts.com: Creating RSS & Atom Feeds with Zend_Feed

Pear-Code-Authors.com: Installation of a local PEAR copy on a shared host

SitePoint Web Foundations: Quick Tip: Install Recki-CT into a Vagrant Ubuntu Box


Community Events





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


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

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