In this tutorial we are going to dive deep into PHP's Internals. It is appropriate for people that know PHP as a language well, but are interested into finding out what goes inside in-depth.

We will start by looking at how the language parser and scanner work, which convert scripts into an Abstract Syntax Tree. When then look at how PHP internal byte code is generated from this AST, and how the engine runs byte code.

After the introduction, we will working together on extending the PHP core with a new feature.

As a treat, we'll also have a look at the OPcache extension, and see which optimisations it does to generated byte code.

Reasonable knowledge of C (or similar languages) is required to make the most of this tutorial.

What you'll learn from this tutorial:
* Learn how PHP works internally.
* Learn how to extend PHP with a new language feature.
* Learn how OPcache does some of its optimisations.

Comments

Comments are closed.

James Titcumb at 12:40 on 6 Jun 2019

Good knowledge, great exercises, good presentation. Relaxed atmosphere and very interesting content. Thanks Derick!

Jos Elstgeest at 12:40 on 6 Jun 2019

Excellent and interesting workshop, I would highly recommend it to any PHP programmer interested in how PHP works internally.

Great workshop! Learned a lot about PHP internals and that it had goto way before we had it in userland. Derick also made a complex subject understandable and fun to dive in. Fun exercises changing (core) behaviour of PHP and learn the consequences of that.

Very clear insights on the way the Zend Engine work internally, and the challenges linked to every steps of the transformation of our PHP code to opcode.

The exercises were pretty good at making us delve inside the C code, without requiring a very deep knowledge of C.