PHP Interview Questions & Answers

Curated PHP 8.x, OOP, PDO, Security, and Architecture Q&A (EN / हिंदी).

Each HTTP request handled by PHP-FPM runs in an isolated request state that allocates and frees its memory at the end of the request (shared-nothing). OPcache keeps compiled Zend opcodes in shared memory across requests so PHP skips disk parsing.

This prevents cross-request memory leaks while maintaining high throughput.

// php.ini: opcache.enable=1
Shared-nothing isolationOPcache bytecode cachePHP-FPM worker pool