SPL – the Standard PHP Library
PHP ships with something called the SPL. Generally, this includes a set of built-in classes, interfaces, and functions that provide foundational features and functionality that you can then use in your own code. The SPL is designed to offer solutions to common problems and is guaranteed to be present in any PHP installation.
Probably the single most utilized SPL feature is spl_autoload_register
, which we will learn more about later in the book.
As with anything PHP, your first point of reference should be to read the official documentation, which for SPL is located at:
PHP: SPL - Manual
https://www.php.net/manual/en/book.spl.php
Data structures
The first items listed in the docs are the SPL data structures:
PHP: Datastructures - Manual
https://www.php.net/manual/en/spl.datastructures.php
These are designed to offer more advanced features than the simple array, such as heaps, queues, and linked lists.
Unfortunately...