In this chapter, we will discuss all the SPL data structures that are currently available in PHP v5.4. Some of them are based on other data structures, for instance, the
SplMaxHeap are extended classes from the
SplQueue are extended from
All these data structures all implement the
Countable interface, which means all data structures are countable (
count() will return the number of elements inside the structure) and they are traversable with
foreach(), but not every structure is really fitting for iteration as I will show you later on.
Most of them also implement the
ArrayAccess interface so they can also be used as an array by accessing elements ...