Part of writing asynchronous code in PHP is using extensions and services to offload processing. Another part is using core mechanics to structure traditionally synchronous code in new ways. That's where this talk comes in.

Generators were added in PHP 5.5. These were originally meant to add syntactic sugar on top of iterable structures, but some folks have learned how to use them to simulate interruptible functions.

We take a look at how generators can be used for iteration, and how iteration and interruptibility are two sides to the same coin. There's hand-on code, as I show you how to build a multitasking system in 100 lines of code. Finally we look at a few popular projects that use this mechanic to facilitate common programming tasks using interruptible functions.

Comments

Comments are closed.

Really interesting, great live coding, but I got a bit lost towards the end

Pulkit Swarup at 12:18 on 30 Jun 2017

Quite useful and interesting

Ben Dechrai at 15:10 on 30 Jun 2017

Chris's presentations are variably interesting, and his personality and presentation style make the information very digestible.

This talk was eye opening, in that it helped the audience look at readily available functionality, and how it can be used in perhaps unexpected or unintentional ways.

Bas at 15:59 on 30 Jun 2017

Great talk, Already working with generators, still learned a new thing! Thanks Chris

Pulkit Swarup at 23:41 on 30 Jun 2017

The concept/topic was totally new to me, which made it interesting clubbed along with presentation skills of Chris. I would say I liked this talk the most.

Eddy de Boer at 16:07 on 1 Jul 2017

Ecellent talk, learned a lot about asynchronous calls/generators in php.

James Titcumb at 18:14 on 1 Jul 2017

Really awesome talk, loved it. Full of good content, well presented. Also thank you for helping me out figuring the async/await stuff after, really appreciate it when someone goes above and beyond the call of duty.

Although I already use generators for a while I heard some new things and use-cases. Great talk, excellent speaker!

Food for thought! Nice examples and out of the box thinking

I finally got to see a talk by Christopher after having followed some of his work through blogposts and twitter. Not disappointed!
Like the blogposts, the level was just right, and the slides very clear (I'd give an additional thumbs-up for the cool live-coding inside the slides if I could!). Totally made we want to check out AMPHP.
I usually look for a point of improvement as feedback, but that would be nit-picking at this point. Well done.

This was really an amazing talk. My favourite one that I've seen at this conference really.

The content was very interesting, and it was very well presented. I especially appreciated the hands on approach and all the enthusiasm.

Very well done!

Thijs at 13:27 on 4 Jul 2017

Great talk, enthusiastically delivery and great pace. Also +1 for the 10 standups at the beginning to keep every body up.

Interesting and informative. I learned much about use cases for Generators. Thank you!