SPL: The Undiscovered Library – Exploring Datastructures
The Standard PHP Library (SPL) has been an option in PHP since version 5.0.0 and always available since 5.3.0, yet few developers seem aware of the powerful features that it offers. From a comprehensive set of iterators and powerful classes, interfaces and abstracts that seem complicated, but are surprisingly easy to use; through a hierarchy of exceptions; and datastructures like heaps, stacks, queues and linked lists; to file handling classes; to the Observer design pattern: the SPL has something to offer that can simplify your code, improve its performance and reduce its memory usage. Despite its wide and varied uses, SPL has been largely forgotten: but now it’s time that developers learned the powerful toolset that’s available to simplify their work. The SPL provides a powerful and flexible toolset: yet few developers even seem aware of its existence, or of how they can use it to simplify their work and improve the quality of their code. It’s time that changed; and SPL should take its place among the standard features of PHP that we use on a daily basis. This talk is aimed at reminding people that SPL provides real solutions to daily problems, and that it isn’t simply an esoteric collection of tools that only belong in a Computer Science theory classroom.