SPHPlayground API
SPHPlayground
sphplayground sphplayground

Standard library: Datastructures

The Standard PHP Library (SPL) provides a set of standard data structures, and there is also a PECL package Efficient data structures for PHP 7 available for some systems. SPHP framework introduces a few extensions and add-ons to this set.

Stack: a (LIFO) data structure

A stack represents a last in, first out (LIFO) data structure. [1] The ArrayStack implements the Stack interface. This interface defines following methods.

Synopsis

interface Stack