News Feed
Sections




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

Lorna Mitchell's Blog:
ArrayAccess vs ArrayObject
September 16, 2011 @ 09:16:37

Lorna Mitchell has a new post to her blog explaining ArrayObject and ArrayAccess and how each is used.

I help people qualify for Zend Certification and in the last few months I've had questions about both ArrayAccess and ArrayObject. This post is an attempt to illuminate both. In very simple terms, ArrayAccess is an interface, which you can implement in your own objects; ArrayObject, on the other hand, is a class, which you can either use or extend.

She give an example of ArrayAccess - a simple class that implements it to make it work like an array. For ArrayObject, she describes some of the things it comes with, including automatically implementing the ArrayAccess, Countable and Traversable interfaces making it a "more powerful array" type.

0 comments voice your opinion now!
arrayaccess arrayobject interface tutorial


blog comments powered by Disqus

Similar Posts

Ed Finkler's Blog: Building a Tumblelog with Gimme Bar and PHP

Brian Swan's Blog: Azure Real World: Migrating a Drupal Site from LAMP to Windows Azure

Zend Developer Zone: An Introduction to the Art of Unit Testing in PHP

NetTuts.com: Installing and Using PHPMyAdmin for Web Development

Jeremy Johnstone's Blog: PHP parser for OS X plist XML files


Community Events





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


community mvc library version framework language symfony composer package security introduction interview update opinion series laravel tool voicesoftheelephpant release podcast

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