It's All About the Goto
summary
Explains how PHP turns source into tokens then an AST then opcodes that Zend executes, and that control flow is implemented as jumps/goto-style opcodes (so conditionals and loops become jumps). Shows tools: tokenizer extension, php-ast visualizer and VLD to inspect opcodes. Notes surprises: PHP7 grows to ~150 opcodes, foreach clones arrays and you cannot jump into language constructs, and branch-aware coverage (Xdebug) is possible but expensive and currently impractical for full projects.
AI-written summary · about
chapters (15)
- 0:00Intro
- 0:27About Me
- 1:14Stages
- 2:14Tokenization
- 6:29Scanner Rules
- 13:23Abstract Syntax Tree (formatted)
- 17:09Byte Code
- 18:52AST is converted to bytecode
- 29:19FOR (rewritten)
- 31:54FOREACH
- 35:06Complex Loops
- 36:42Dead Code
- 38:56Xdebug code coverage output
- 39:34Xdebug branch coverage display
- 41:17Recap








