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.

Good talk, I didn't know about the parser states before.
Thank you

LJ NOBLE at 13:10 on 6 Oct 2018

No fault of the presenter, but as a beginner I was lost...

Daniel Craigie at 14:04 on 6 Oct 2018

Always love a talk that gets down and dirty behind the scenes in PHP. I would have liked to see some practicle demonstrations of the different ways of performing static analysis and enhancing code.

Harro Verton at 14:56 on 6 Oct 2018

As always, very good.

My entire Uni course in compiler design flashed by in less than an hour. Where were you 30-odd years ago when I was given a syntax specification, an input source file, and the assignment "write a lexer, parser and compiler (in pascal !), and when done, run the source file and hand in the results"... ;-)

Ken Guest at 16:53 on 6 Oct 2018

very interesting talk, especially in relation to the use of ASTs in userland. Thank you!

Peter McDonald at 23:13 on 6 Oct 2018

Always interested in learning the inner working of PHP. James is passionate about his subject of expertise and goes a good way of explaining.

James Hodgson at 09:07 on 7 Oct 2018

A really interesting talk. Was great to hear a out something I didn't know about and to find out about some of the internals of php

Andy Gaskell at 12:01 on 7 Oct 2018

Really good technical talk about the nuts and bolts of the PHP7 abstract syntax tree. A complex topic explained in a clear way.

Patryk Zajdler at 10:58 on 8 Oct 2018

Absolutely loved the talk. I can only wish there were more examples / ideas of how developers can use AST (as opposed to how it's being used in already existing libraries).