PHP generators allows you to iterate through data by using less memory compared to a standard foreach function. Simple example: If you want to display the numbers between 1 and 5000000 with a simple foreach you may hit the memory limits used by PHP.
Continue reading “PHP Generators and yield”