SPL, the Standard PHP library—first introduced with PHP 5.0—provides many handy features for PHP projects. You’ll remember we mentioned its provision of iterator interfaces in Chapter 4—but this is just one of its many useful facets.
The Standard PHP Library is intended to provide best of breed interfaces—as well as abstract and concrete implementations of design patterns and solutions to common problems—while taking advantage of the new object oriented features provided in PHP 5.
If you want to create an object that can be accessed using array
syntax (and is seen as an array for all functions requiring one), you can
ArrayAccess interface. This interface ...