Zend Engine
termKept in this browser · My desk
The compiler and virtual machine at the core of PHP, which turns each script into bytecode and executes it.
Andi Gutmans and Zeev Suraski named it after their first names, Zeev and Andi. It first appeared in mid-1999 and has carried PHP since 4.0 in May 2000; Zend Engine 2.0 brought PHP 5's object model and 3.0 the speed-up of PHP 7. OPcache and the JIT compiler both work on its bytecode.
The engine is separate from the server APIs that connect PHP to a web server or a terminal; the manual's page on the command line lists what changes from one SAPI to another, such as headers, the working directory and a few overridden settings, while the engine underneath stays the same.
Without a cache the engine compiles every script on every request; OPcache stores the compiled bytecode in shared memory so the work happens once, and the JIT added in PHP 8.0 can compile hot code further into machine code. At the end of a request PHP can leave the freeing of the request's variables to the Zend Engine's memory manager, en masse, a fast-shutdown sequence that was an OPcache option until PHP 7.2 and is now built into PHP and used where possible.
Also known as: zend, zend vm, php engine