One of the new features that was introduced in PHP 5.5: Generators provide an iterable alternative to arrays, or to
classes that implement the Iterator interface. At the simplest level, they don't add anything new to PHP that you
couldn't already do before, simply returning values or key/value pairs to a loop; though they do give you options to
perform certain iterative functions without the memory overheads of an array, or without the complexities of lots of
boilerplate code that an Iterator class requires.
But look more closely at Generators, and they can be used for much more complex purposes: from simulating arrays with duplicate keys, or keys that aren't simple integer or string values, to accepting new data each iteration rather than simply returning it, so that you can actually modify their behaviour dynamically, or building Cooperative subroutines, even to simulating parallel processing.
Generators add real power to PHP.