Performance
How PHP runs, and what that means in practice.
Execution model
Source is compiled to opcodes and cached by OPcache; a JIT exists since PHP 8.0 and helps CPU-bound code more than typical web requests.
Memory
Reference counting frees most memory immediately; everything is released at the end of a request.
Concurrency
Concurrency through many worker processes (PHP-FPM); Fibers enable async libraries such as ReactPHP and AMPHP.
In practice
PHP 7 and 8 were major speed-ups over PHP 5. Bootstrapping the framework on every request is often the main cost; long-running servers remove it.
Saved in this browser only. Part of From code to production (0/5).