New SPL Features in PHP 5.3
CodeWorks '09 Webcast Series
June 26, 2009
Salut! Comment sa-va?
Senior Consultant at Blue Parabola
● Native of Duson, Louisiana
● Author and TE for php|architect Magazine
● Book coming soon from php|architect
● Contributor to Zend Framework project
A Long, Long Time Ago (Or Not)
● Alexander Stepanov
● Conceived of the
STL for C++
Goals of SPL are
In a Galaxy Not So Far Away
Pre-5.3 SPL Features
● Classes: ArrayObject, SplFileInfo...
● Interfaces: ArrayAccess, Countable...
● Exceptions: BadFunctionCallException...
● Functions: spl_autoload_register...
So What's New?
In comparison to the STL:
● Iterators? Nope.
● Algorithms? Nope.
● Functors? Nope.
● Well, there's only one thing left then...
“A container is a class, a data structure,
or an abstract data type whose instances
are collections of other objects. They are
used to store objects in an organized way
following specific access rules.”
“Container (data structure)” - Wikipedia
We Don't Need
No Stinkin' Containers!
Some Great SPL Resources
● email@example.com or firstname.lastname@example.org
● Elazar on the Freenode IRC network
● Look for me in Dallas, Atlanta, Miami,
Washington, and New York City
at CodeWorks 2009!
● Watch for my book next quarter!
Source: Christian Flickinger