nerdexam
Zend

200-710 · Question #101

Which php.ini setting is usually required to use an opcode cache?

The correct answer is B. zend_extension. zend_extension is required because opcode caches (like OPcache) operate at the Zend engine level - they intercept and cache compiled bytecode before PHP's normal execution flow. This deep engine integration requires zend_extension rather than the standard extension loader, so…

PHP Basics

Question

Which php.ini setting is usually required to use an opcode cache?

Options

  • Aextension
  • Bzend_extension
  • Coptimizer
  • Ddl

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    70% (21)
  • C
    20% (6)
  • D
    3% (1)

Explanation

zend_extension is required because opcode caches (like OPcache) operate at the Zend engine level - they intercept and cache compiled bytecode before PHP's normal execution flow. This deep engine integration requires zend_extension rather than the standard extension loader, so in php.ini you'd write zend_extension=opcache.so (Linux) or zend_extension=php_opcache.dll (Windows).

Why the others are wrong:

  • A. extension loads ordinary PHP userland extensions (e.g., curl, pdo). These run on top of the Zend engine, not inside it - too shallow for an opcode cache.
  • C. optimizer is not a valid php.ini directive; it's often confused with legacy products like "Zend Optimizer," but it doesn't load anything.
  • D. dl is a PHP runtime function, not a php.ini setting, and it's deprecated - it was never the right tool for opcode caches.

Memory tip: Associate the Z in Zend_extension with Zero - opcode caches work at ground zero (the engine core), so they need the Zend-level hook. If it touches the engine itself, reach for zend_extension.

Topics

#php.ini#opcode cache#zend_extension#PHP configuration

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice