An example use-case for PHP 5.5 generators