Category: opcache

How PHP Executes – from Source Code to Render

Inspired by a recent article on how Ruby code executes, this article covers the execution process for PHP code. Introduction There’s a lot going on under the hood when we execute a piece of PHP code. Broadly speaking, the PHP interpreter goes through four stages when executing code: Lexing Parsing Compilation I...

Caching Hat-trick: Zend Opcache, Etags and Query Caching

In this article, we will be looking at some of the common caching techniques in PHP: Opcache, Expires Headers and Query Caching in MySQL. We’ll look at additional approaches in part 2. PHP’s Request Lifecycle Before we move on, it’s important to understand PHP’s request lifecycle. What happens behind the scene...