Climbing the Abstract Syntax Tree
summary
Shows concretely that PHP 7 adds an actual AST between parser and compiler, demonstrates a toy compiler that compiles AST to opcodes and shows measurable optimizations (constant folding) and speedups; demos include ast extension by Nikita Popov for accessing AST, php‑parser library for userland parsing, and STK allows modification and execution of altered ASTs with a worked example that flips a true to false and changes program output.
AI-written summary · about
chapters (7)
- 0:00Start
- 23:35Writing a simple lexer
- 25:28Parsing the tokens
- 29:23Executing the AST
- 30:46What does this mean for me?
- 35:31PhpParser
- 36:57Better Reflection








