I was reading an article on the advantage of yield statements and iterables - a handy and useful thing where "the list is so large that merely creating it would consume all of the system's memory"
PHP also has yield statments (generators).
This would have practical implications in Wordpress - sometimes I have had to fix a site that exceeded memory limits from Wordpress' grabbing comments when thousands of spammy comments are pending in the database.
I have to wonder why Wordpress still creates a whole array of data in memory for get_posts and similar - is this something that has just never been considered, or something they absolutely have to have in array in memory for legacy code, and is impractical to rewrite?