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

PHPBuilder.com: 10 Easy Solutions for PHP String Manipulation

ZD Net Asia: Keep your options open with FTP file uploads

PHPMaster.com: Bending XML to Your Will

In Coding: Laravel 4 Authentication A Comprehensive Tutorial

PHPMaster.com: Server-Side HTML Handling Using phpQuery


Community Events

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


example symfony community project application language programming series opinion php7 interview introduction composer api part2 framework podcast yii2 list laravel

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