Talk in English - US at PHPDetroit Conference 2018
View Slides: https://speakerdeck.com/justinyost/generators-all-about-the-yield-3
Checkout the code: https://github.com/justinyost/las-vegas-generators-talk
Short URL: https://joind.in/talk/7688b (QR-Code (opens in new window))
Generators are a relatively unexplored feature of PHP. Coming about in PHP 5.5, Generators provide for the ability to write Iterator style code without a lot of upfront work. In addition to that Generators provide for some amazing abilities to write coroutines in PHP that we previously didn't have. Generators are at their core a tool to enable us to write code that can solve entire classes of problems that beforehand would have been exceedingly hard to do before hand. Perhaps most importantly, generators are fun to explore.