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 Will Learn ------- - How PHP works internally. - How to extend PHP with a new feature. - How OPcache does some of its optimisations. Required -------- For understanding the tutorial: - Moderate knowledge of C For taking part in the exercises: - A Linux machine or Linux VM - Compilers installed (apt-get install php-dev, or similar) - A GIT clone of the PHP source tree ([email protected]:php/php-src.git)


Comments are closed.

Nate Finch at 16:59 on 16 May 2023

This was amazing to watch. Mind-blowing how much is involved in adding functionality to PHP. Derick "just knows" where things are and how to quickly add and debug everything... Very cool.

This was an intense presentation. Thank you thank you thank you for all that you do for the community!

Nick Marsceau at 17:44 on 16 May 2023

Derick did a fantastic job presenting a very complex topic! I appreciated all the times he pointed out areas where there is room for improvement in the PHP internals. That made the idea of contributing to PHP much more approachable and less scary.

Gary Pedretty at 09:04 on 18 May 2023

Deep deep look, interesting to see the inside perspective

Kyle Schatzle at 09:18 on 18 May 2023

Exactly what I was hoping to get. Extremely detailed and knowledgable. Thanks for everything you do.