~/talk

Iterators in PHP

Talkat SunshinePHP 2014 · 2014-02-06..02-08· [php]
links:none on file
slides:none on file

Shows concrete claims and working code: uses DirectoryIterator/FileSystemIterator to list files, wraps iterators with FilterIterator and RegexIterator to find or exclude files, uses RecursiveIteratorIterator to build an HTML menu and to delete cache files recursively, demonstrates that CachingIterator acts as a look‑ahead for previous/next navigation, and proves generators via yield (PHP 5.5) remove the heavy iterator boilerplate. Notes: FileSystemIterator skips dots by default and generators save iterator state.

AI-written summary · about

  1. 0:00Start
  2. 3:51Defining an Iterator
  3. 6:18Iterator Basics
  4. 7:57Recursive Iterators prepare an iterator to be recursively iterated.
  5. 13:14Directory Iterator
  6. 15:07Filesystem Iterator
  7. 16:13Glob Iterator
  8. 21:09Regex Iterator
  9. 22:10Parent Iterator
  10. 22:30Limit Iterator
  11. 24:13Callback Filter Iterator
  12. 26:15Caching Iterator
  13. 31:00Testing Iterators
  14. 31:29Iterator Functions
  15. 32:35Questions? Concerns? Complaints?
~/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.