Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84346 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74856 invoked from network); 5 Mar 2015 17:12:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2015 17:12:53 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.177 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.177 mail-we0-f177.google.com Received: from [74.125.82.177] ([74.125.82.177:36107] helo=mail-we0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/46-40418-49E88F45 for ; Thu, 05 Mar 2015 12:12:52 -0500 Received: by wesw55 with SMTP id w55so932782wes.3 for ; Thu, 05 Mar 2015 09:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=NrqcO3ikxgo4wy03aXN1ezrLrfFrSo+wQxyquJ224aY=; b=b3K6E9oNS0xlrH0177TCPmdalsJVws0OGumZlb0UMbs0GNJNLyJWVSWKJDpsRV2plf /HEL+Z63fTtAmL8aIyyOJQlmII70Qh5m8AQtwqqjavl7E4+E6VieKdVbzREtpe2VsPne Afv2H7cpze8IyHwd5fMXUjfMJXcGIGQ+EaWl+ZL7e1TcbZdwqfAfAc7frMV9LrCqktnM regw4UlSxsyWLH8W6/Zv8QUEfsn3imwoBExf5gnamoTUMnLLyqX3+avQbhUDoljMDzd+ Y0hV+9hKcrPxnPjHsW39zxsTmOAZVScXBxwfOTD5JXpcIz68RuXio8tMvqZb1/KBMBmZ MegA== X-Received: by 10.180.75.243 with SMTP id f19mr24470945wiw.94.1425575569876; Thu, 05 Mar 2015 09:12:49 -0800 (PST) Received: from [192.168.0.159] ([62.189.198.114]) by mx.google.com with ESMTPSA id uo6sm11330050wjc.49.2015.03.05.09.12.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 09:12:49 -0800 (PST) Message-ID: <54F88E53.9030908@gmail.com> Date: Thu, 05 Mar 2015 17:11:47 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not? From: rowan.collins@gmail.com (Rowan Collins) j adams wrote on 05/03/2015 16:12: > I don't know if this is a question for the documentation team or not, but > figured I'd start here. There does not appear to be any definitive, clear, > reliable information on PHP's op caching functionality in recent 5.* > versions and this problem needs to be remedied. > > Question 1: Is OpCache enabled by default in php 5.5 and later or not? > > This page: > http://php.net/manual/en/intro.opcache.php > says "This extension is bundled with PHP 5.5.0 and later, and is ยป > available in PECL for PHP versions 5.2, 5.3 and 5.4." > > But this page: > http://php.net/manual/en/opcache.installation.php > says "PHP 5.5.0 and later > > OPcache can only be compiled as a shared extension. If you have disabled > the building of default extensions with --disable-all , you must compile > PHP with the --enable-opcache option for OPcache to be available. > > Once compiled, you can use the zend_extension configuration directive to > load the OPcache extension into PHP. This can be done with > zend_extension=/full/path/to/opcache.so on non-Windows platforms, and > zend_extension=C:\path\to\php_opcache.dll on Windows." > > > > Question 2: > If OpCache is enabled, does it require any php.ini settings or not? Does it > show any functions or constants or phpinfo() that will reveal its > existence? I've got php 5.6.6 installed on CentOS 7 and I can find neither > hide nor hair of it. There is, however, an opcache package one can install > (php56u-opcache.x86_64 in my case). > > > > Question 3: > What about Zend Optimizer? Still other articles say it has been integrated > into php 5.5 and later, but this mythical beast also makes no sign to > indicate its inclusion either. Some articles: > https://wiki.php.net/rfc/optimizerplus > https://wordpress.org/support/topic/looking-ahead-to-php-55-zend-optimizer-the-end-of-apc > http://www.internetnews.com/blog/skerner/php-5-5-to-include-open-source-zend-optimizer-.html > > > Seems to me there is currently a lot of confusion surrounding OPCache and > it should be cleared up. I think part of your confusion here is over terminology: - Every module of PHP is referred to as an "extension", however deeply embedded it is in the language. The most basic functions you can think of, like string and array manipulation, are in "ext/standard" in the source. - A module being "bundled" means that it is included in the official tarball releases on php.net, and indicates a certain guarantee of maintenance for compatibility with new versions of PHP. - Some bundled extensions cannot be disabled, because to do so would break too many dependencies. Most can technically be disabled, and/or built as separate shared libraries to be enabled in your php.ini as desired. In the case of OpCache, it's bundled, but as a shared library. - The PHP you install on a Linux system will most likely NOT be the official tarball, but something put together by your Linux distribution. They are under no obligation to handle all bundled extensions the same way, or enable them by default. They may for instance install the extensions as shared libraries and offer a script to enable/disable them, or they may put them all into separate packages which you have to install and then configure themselves automatically. - Oh, and roughly speaking "OpCache" is the name for the open sourced version of "ZendOptimizer+", i.e. the version which was made available as a PECL download for PHP 5.2, 5.3, and 5.4, and included as a "bundled" extension in PHP 5.5 onwards. This is all a rather long-winded way of saying the same thing Rasmus just said, but maybe it will help. :) Regards, -- Rowan Collins [IMSoP]