In this post I demonstrate an effective way to create iterators and generators in PHP and provide an example of…
Initially I started creating a general post about PHP Generators, a feature introduced in PHP 5.5. However since I keep…
I’ve created a small PHP library to read from, and iterate through, Wikidata/Wikibase JSON dumps. Wikidata is the free knowledge…
Today I was refactoring some code in one of my libraries, and ended up replacing a named Iterator class with…
I recently watched Clean Code Episode 34: Pattern Apocalypse, which is about several design patterns, including the Iterator. Afterwards I…
Sometimes you need to loop over a big pile of stuff and execute an action for each item. In the…