Delivery for PHPs
Delivery in PHP covers verifying and shipping an application. PHPUnit runs unit tests, static analysers such as PHPStan find type errors without running code, and deployment places the code on a server running PHP-FPM behind Nginx or Apache with production settings, opcache enabled and errors logged rather than displayed.
Stage: Secure and Ship · Part of the PHP roadmap · Last reviewed 19 November 2026
What to learn in Delivery
- Write a PHPUnit test case with assertions and a data provider
- Run PHPStan to catch type mistakes before deployment
- Turn off display_errors in production and log errors to a file
- Enable opcache and explain how it speeds up PHP
- Deploy an app with PHP-FPM behind Nginx and a Composer install step
Delivery interview questions
Why should display_errors be off in production?
Error messages can reveal file paths, SQL, and configuration to visitors, helping attackers. In production set display_errors to off and log_errors to on, so developers read problems from logs while users see a generic error page.
What does PHP-FPM do?
PHP-FPM is a FastCGI process manager that keeps a pool of PHP worker processes. The web server such as Nginx passes PHP requests to it, which allows tuning worker counts, isolating sites and restarting without dropping the web server.
Where Delivery fits in the PHP roadmap
Delivery belongs to the Secure and Ship stage (intermediate level), which takes about 14 hours. Quality.