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

Please login to leave a comment

Rated 4

Shopware AG at 13:07 on 30 Jun 2017

Well presented!

Rated 5

Jeroen Sen at 13:31 on 30 Jun 2017

Probably the best talk I've ever attended irl. James really succeeded in making complex matter (looking) super simple!

Rated 5

Anonymous at 13:37 on 30 Jun 2017

A nice insight into the inner workings of php, very good job making an arcane subject easy to understand. The bits about monkey patching could perhaps use a little more intro and context (examples), but it did not bother understanding.

Rated 4

Martijn Smit at 14:47 on 30 Jun 2017

Made me understand the AST very easy.
Very good talk.

Rated 2

Erik de Bos at 21:42 on 30 Jun 2017

Interesting subject, but I would have wanted a more complete view of the process, or more focus on applicability. Instead it was a bit of both without satisfying either.

Rated 5

Liam Wiltshire at 13:05 on 1 Jul 2017

Well delivered and interesting talk on a subject that perhaps doesn't have a huge amount of day-to-day application. Looking forward to monkey-patching production sometime soon!! :p

Rated 4

Deniz Zoeteman at 20:36 on 1 Jul 2017

Pretty good talk! Got to learn quite a lot about the PHP lexer, parser and compiler!

A nice wel explained look under the hood. Great presentation skills

I really enjoy this topic, and speak about it every now and then. I went in thinking it might be a little boring because of that (given the abstract), but I was pleasantly surprised. I'd definitely sit through this talk about, but in case you're looking for something to improve before then...

I found the Polish Notation section _very_ dry. I understand why you needed to explain it, since the grammar you defined was easier to execute when polish notation was used, but I think there are other avenues you could try, which would remove the need to explain Polish Notation at all.

To contrast, Christopher Hoult also spoke about Polish Notation (in his graphs talk) and it was far more digestible. Perhaps it was because he was approaching it via an introduction to graph traversal. Perhaps it was because his visual aids were better. In any case, I much preferred his description of Polish Notation.

If you explained your parser via state machines and then lightly touched on prefix/postfix, I think you'd avoid needing to demonstrate Polish Notation at all. You'd also have more time to expand on the grammar (for things like parenthetical associativity).