Speaker Deck

It Feels Great to Iterate

by Jeremy Lindblom

Published April 7, 2015 in Programming

Iterators are an awesome and important feature of PHP, and PHP comes with a lot of them built in too. Let’s talk about what they are, how they’re used, and how to make your own. Then we'll talk about generators, which is really cool PHP 5.5+ feature that takes iterators to the next level. And… we can’t talk about iterators without also discussing the Decorator design pattern. After all, most of the SPL iterator classes are decorators too. It’s never felt so great to iterate! May the foreach be with you!