Iterators and Decorators and Generators, Oh My!

Iterators and Decorators and Generators, Oh My!

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 were introduced in PHP 5.5, and that take Iterators to the next level. And… we can’t talk about Iterators without also discussing composition and the Decorator design pattern. After all, many of the SPL Iterator classes are Decorators too.

Ca57a7cfac69ba3abf517470f3770aae?s=128

Jeremy Lindblom

September 21, 2018
Tweet