What does yield mean in PHP?
I’ve recently stumbled over this code: function xrange($min, $max) { for ($i = $min; $i <= $max; $i++) { yield $i; } } I’ve never seen this yield keyword before. Trying to run the code I get Parse error: syntax error, unexpected T_VARIABLE on line x So what is this yield keyword? Is it even … Read more