~/talk

(Re)Discovering The SPL

Talkat PHP UK Conference 2014 · 2014-02-21..02-22· [php]
speakerdeck:jaytaph
slides:none on file

Claim: SPL is powerful but poorly documented so people misuse it. Shows concrete patterns: compose DirectoryIterator + RegexIterator + LimitIterator to keep business logic out of loops and make filters testable; explains surprising pitfalls like LimitIterator lacks Countable (count breaks when wrapped) and that seekable iterator lets LimitIterator skip to offset for big skips; highlights confusing names and bugs such as SPL autoload_unregister wipes autoload stack, ArrayObject reference semantics, and CachingIterator acting as look‑ahead rather than reliable cache.

AI-written summary · about

  1. 0:00Introduction
  2. 1:00SPL Documentation
  3. 3:38Traversable
  4. 5:37Iterator
  5. 13:18Countable
  6. 18:28Iterating
  7. 18:57PHP Source Code
  8. 21:13Iterators
  9. 21:46Iterator Aggregate
  10. 23:25Something Iterator
  11. 23:47Recursive Iterator
  12. 26:46Recursive Filter Iterator
  13. 28:12Lookahead Iterator
  14. 31:12SPL Iterators
  15. 32:06SPL Arrays
  16. 32:31SPL Data Structures
  17. 33:09Big O Notation
  18. 38:05SPL Object Storage
  19. 40:39SPL Exceptions
  20. 41:34Logic Exceptions
  21. 43:07Runtime Exceptions
  22. 44:39Never throw exception
  23. 46:51Miscellaneous stuff
  24. 47:40Autoloader
  25. 49:38Area Objects
  26. 51:15How to make the SPL easier
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.