I\'m looking at the PHP Manual, and I\'m not seeing a section on data structures that most languages have, such as lists and sets. Am I just blind or does PHP not have anything
As for today (PHP 7.4), only native structure is an array
. But from PHP7 extension DS appeared that includes new data structures and all of them are much faster than other implementations (including SPL recommended in accepted answer).
DS extension - PHP Manual
Interfaces: Collection
, Hashable
, Sequence
Classes: Vector
, Deque
, Map
, Pair
, Set
, Stack
, Queue
, PriorityQueue
Orginal article about extension