Back to Vol 18, Issue 7

PHP Architect · Vol 18, Issue 7 · July 2019

Internal Apparatus: A Walk Through the Generated Code

by Edward Barnard

The PHP compiler/interpreter reads through our PHP code and produces an intermediate form. PHP’s virtual machine then interprets this intermediate form. PHP’s “generated code” feature allows us to walk through this intermediate form, better understanding exactly what PHP does with the software we write. We’ll begin with a three line example, observing the generated-code changes as we transform our example into a function call and then a static method call. We’ll implement a recursive algorithm to see how the code generator handles the situation.

The full article is in PHP Architect Vol 18, Issue 7. Subscribe to read it and every new issue.

Subscribe
Edward Barnard

About the author

Edward Barnard

Ed Barnard had a front-row seat when the Morris Worm took down the Internet, November 1988. He was teaching CRAY-1 supercomputer operating system internals to analysts as they were being directly hit by the Worm. It was a busy week! Ed continues to indulge his interests in computer security and teaching software concepts to others.

Our Partners

Collaborating with industry leaders to bring you the best PHP resources and expertise

Interested in partnering? Get in touch →