There is an opcache.optimization_level php.ini directive. It is a bitmask a defaults to 0xffffffff
- so by default OPcache does all the optimizations.
What kind of optimizations does OPcache do? What passes on bytecode are done?
Follow-up question: is there a code pattern that OPcache can optimise very well? For example, HHVM can skip execution of files that contain only class/function declarations and it just fills class/function tables.