Data Structure¶
Data Structures, is a PHP extension which provides efficient data structures, provided as an alternative to the array. It is available since PHP 7.
In particular, it provides the following structures:
Collection
Sequence
Vector
Deque
Map
Pair
Set
Stack
Queue
PriorityQueue.
<?php
$stack = [];
$stack[] = first;
$stack[] = second;
// same as array_push($stack, second);
echo array_pop($stack); // Outputs: second
?>
See also ext-ds.
Related : Collection, Set, Hash, Stack, Queue, Pair, Sequence, Datastack, Data Structure