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

Matthew Weir O'Phinney's Blog:
Overloading arrays in PHP 5.2.0
December 29, 2006 @ 07:33:00

Matthew Weir O'Phinney has a new post on his blog today talking about overloading arrays in PHP 5.2.0 using the magic __get and __construct functions.

Several weeks back, a bug was reported against Zend_View that had me initially stumped. [...] Basically, __get() no longer returns a reference and returns values in read mode, which makes modifying arrays using overloading impossible using traditional methods.

He gives a code example of the problem and two ways to get around it - one using a switch statement to get around the problem and the other ("best solution") was Matthew's option to extend the ArrayObject class.

0 comments voice your opinion now!
zend_view overload array php5 switch arrayobject zend_view overload array php5 switch arrayobject


blog comments powered by Disqus

Similar Posts

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

Job Posting: Open Source Staffing Seeks a PHP5 Developer (New York, NY)

DevShed: A Quick Overview of the XML DOM Extension in PHP 5

Lorna Mitchell's Blog: One-Step Symlink Switch

CorePHP Blog: A Guide to running Apache 2, PHP 4 & PHP 5 on Windows XP


Community Events











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


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

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