The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run. To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before. After seeing this talk, you'll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code. (*actual magic or time-warp not guaranteed)

Comments

Comments are closed.

WTF is the AST? now I know ... and now I can capture your code and inject my code to make your code my code .. MWUAHAHAHA

Although I was a bit perplexed by all the heavy code on the screen, James did a good job in simplifying things and explaining just how AST contributes to the higher performance gains with PHP 7.

Not sure I will be coding my own compiler any time soon, but what I will take away from this talk is an appreciation to the advancements that have been made and spending time reading up on all the underlying technologies that a code-pleb like me is not generally aware of!

Great talk James!

Great talk and very insightful. Now we not only know that php 7 is faster but also why. James had a very good way of explaining this really difficult topic.

This talk was fascinating, although I will admit it did get quite complicated at some points. I probably wasn't the right target audience (since I am not interested into delving THAT deep into PHP's inner workings, and playing around with them) but it was still great to get insight into how PHP 7 has changed to an AST, what it is, how it works and what developers can do to leverage it.

It was also great to see the tools with some examples, and writing our own compiler through the slides was an interesting exercise to get an idea of the logic needed. Overall this is an great talk, and I'd recommend it for more senior developers and anyone interested in understanding PHP's inner workings (and the AST especially)

Jonathan Page at 09:51 on 29 Sep 2017

For covering a difficult topic, James did a great job.

Recommended for those that aren't scared to look under the hood.

Just being aware of the AST and knowing what PHP needs to do to execute your code already makes you think about writing better and faster code