News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Understanding OpCache
July 30, 2014 @ 10:39:27

On the SitePoint PHP blog there's a new tutorial posted helping you understand OpCache, the caching engine built into PHP versions 5.5 and above. This cache isn't designed to cache data or other content, though. An OpCache caches "opcodes" when a script is executed.

PHP in version 5.5 comes with a caching engine built-in - OpCache - which stores precompiled script bytecode in the memory. If you're familiar with APC or Xcache, you will already know how such engines work. As each PHP script is being compiled at runtime, a part of the execution time gets used for transforming the human readable code into code that can be understood by the machine. A bytecode cache engine like OpCache, APC or Xcache does it only once - during the first execution of a specific PHP file. Then the precompiled script is being stored in memory, which should lead to performance boosts in your PHP applications.

The remainder of the article is a series of answers to some common questions about using the cache, what it will do for your applications and some tools to use for tuning and status updates:

  • Is OpCache worth installing at all? What speed boost can I expect?
  • I already use APC cache. Should I migrate to OpCache?
  • How to check if OpCache is actually caching my files?
  • Is there any framework-specific config that I should set?
  • I keep my app config in a PHP file. Can I prevent it from being cached?
  • How can I run both a development and a production environment on a single server where OpCache is enabled?
0 comments voice your opinion now!
opcache opcode cache tutorial introduction php55 bytecode

Link: http://www.sitepoint.com/understanding-opcache/

blog comments powered by Disqus

Similar Posts

Cory Borrow's Blog: Creating thumbs from textfiles with PHP and GD

Matthew Weier O'Phinney: ZF2 Modules Quickstart (Screencast)

Mike Willbanks' Blog: Integrating Gearman Into Zend Framework

Developer.com: Integrating Twitter Into the Zend Framework

Qandidate.com: Debugging PHP applications with HHVM


Community Events





Don't see your event here?
Let us know!


introduction opinion framework bugfix community laravel deployment threedevsandamaybe library series release zendserver conference podcast interview developer language api tips symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework