It was explained to me by a more senior PHP programmer that using PHP arrays is inefficient as it results in extra data copying. He then explained that you get less memory consumption and more performance by creating classes to hold your data, even arrays. PHP would then not feel compelled to copy/deep copy the data in a class as it would an array of arrays.
He also explained the object I would be looking for would be easier to find in a proper structured tree of objects than an array of arrays. This I can understand.
Here comes the questions, I know they're a little vague.
Is there ever a proper situation to use an array of arrays over an object to store data?
Will it always be more memory and performance efficient to store data in objects?
Thanks a lot in advance guys, I could write and profile a bunch of PHP apps to figure it out but I'm sure a lot of you already know the answer.