Пример #1
0
0.1.1  2013-03-18  today Zend completely renamed Optimizer+ to OPcache, adjusted OCP to keep working
0.1.0  2013-03-17  added group/sort indicators, replaced "accelerator_" functions with "opcache_"
0.0.6  2013-03-16  transition support as Zend renames product and functions for PHP 5.5 (stasilok)
0.0.5  2013-03-10  added refresh button (GK)
0.0.4  2013-02-18  added file grouping and sorting (click on headers) - code needs cleanup but gets the job done
0.0.2  2013-02-14  first public release

* known problems/limitations:
Unlike APC, the Zend OPcache API
 - cannot determine when a file was put into the cache
 - cannot change settings on the fly
*/
namespace {
    $config = array();
    $app = new OCP\App($config);
    $app->run();
}
namespace OCP {
    class Opcache
    {
        protected $extension = '';
        protected $iniPrefix = '';
        protected $functionPrefix = '';
        protected $status;
        protected $isTest = false;
        public function __construct()
        {
            foreach (array('zend opcache', 'zend optimizer+') as $name) {
                if (extension_loaded($name)) {
                    $this->extension = $name;
                    switch ($name) {