Quick Answer
Opcode preloading (PHP 7.4+) loads PHP files into shared memory at server start. Scripts are compiled once and shared across all PHP-FPM workers with zero per-request overhead. Configure via opcache.preload pointing to a preload script. opcache.preload_user sets the owner. Best for frameworks: preload all core framework files. Can improve performance 5-20% but requires restart to reload.
Answer
Opcode preloading loads classes and functions into Opcache on server startup to eliminate cold starts.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.
PHP interview questions and answers for beginner, junior, mid-level, senior, and expert developers. Ideal for freshers and experienced candidates preparing for PHP roles.