There is even something called:
ArrayObject
in PHP.
It is an object that you can use in some cases as an array.
We can say it is not a true array and neither a true object.
It has got features from both and is something in between.
Example:
foreach($array AS $x)
will not work to loop an object. You get error.
But if you use an ArrayObject with indexes like $ArrayObject->a0, ArrayObject->a2, ArrayObject->a3, values,
foreach will work just as if you are looping an array:
foreach($ArrayObject AS $a)
Here is PHP ArrayObject Class & Functions:
http://www.php.net/manual/en/class.arrayobject.php
🙂