Climbing the Abstract Syntax Tree

James Titcumb (28.Sep.2017 at 11:15, 45 min)
Talk at PHP South Africa (English - UK)

Rating: 5 of 5

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)

Who are you?

Claim talk

Talk claims have been moved to the new site.

Please login to the new site to claim your talk

Comments closed.


Rating: 5 of 5

28.Sep.2017 at 14:03 by Gareth McCumskey (12 comments) via Web2 LIVE

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

Rating: 5 of 5

28.Sep.2017 at 18:22 by Sergio Henriques (6 comments) via Web2 LIVE

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!

Rating: 5 of 5

28.Sep.2017 at 21:34 by Petrus Prinsloo (2 comments) via Web2 LIVE

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.

Rating: 4 of 5

29.Sep.2017 at 07:32 by Christopher Human (14 comments) via Web2 LIVE

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)

Rating: 5 of 5

29.Sep.2017 at 09:51 by Jonathan Page (3 comments) via Web2 LIVE

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

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

Rating: 5 of 5

29.Sep.2017 at 13:08 by Francois Steyn (5 comments) via Web2 LIVE

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

© 2018