Siehe auch

User Contributed Notes 3 notes

It should be mentioned that opcache_reset() does not reset cache when executed via cli. So `php -r "var_dump(opcache_reset());"` outputs "true" but doesn't clean cache. Make file, access it via http - and cache is clean.

In some (most?) systems PHP's CLI has a separate opcode cache to the one used by the web server or PHP-FPM process, which means running opcache_reset() in the CLI won't reset the webserver/fpm opcode cache, and vice-versa.