I\'d like to be able to write a PHP class that behaves like an array and uses normal array syntax for getting & setting.
For example (where Foo is a PHP class of
If you extend ArrayObject or implement ArrayAccess then you can do what you want.
ArrayObject
ArrayAccess