HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Keywords : Use yield to create a generator function
The yield
keyword is used to create a generator function. Generator functions act as
iterators which can be looped through with a foreach
loop.
The value given by the yield
keyword is used as a value in one of the iterations of the
loop.
The foreach
keyword.
The yield from
keyword.
❮ PHP Keywords