Climbing the Abstract Syntax Tree

James Titcumb (16.Aug.2018 at 10:00, 50 min)
Talk at Southeast PHP (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

18.Aug.2018 at 12:58 by Randall (9 comments) via Web2 LIVE

Wow. That was deep and I learned a lot. I never really thought about the parsing phase using RegEx. I have a much deeper respect for the core dev team!

It's pretty dense, so thanks for sharing the slides. I'll probably need to go through it several times to soak it up.

Thank you for mentioning the extensions. I'm going to make use of them.

Rating: 5 of 5

19.Aug.2018 at 11:58 by Tiffany Harpfer (1 comments) via Web2 LIVE

This talk really helped me understand how PHP works under the hood. Your examples were clear and easy to understand. Prior to this I knew virtually nothing about AST and now I have a working understanding of it and am looking forward to using some of the techniques you suggested to analyze my code performance. I'm especially looking forward to trying out the Better Reflection library. Thanks for the talk and providing the slides!

© 2019