When a class implements the ArrayAccess
interface, it becomes ready to function as an array, complete with OffsetGet, OffsetSet and so on.
One thing I didn't see was an implementation for when we want to count()
or sizeof()
it, which, in my limited knowledge of PHP, amounts to the same.
Is there anything like it already implemented in standard PHP?