Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84347 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79093 invoked from network); 5 Mar 2015 17:46:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2015 17:46:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=zardozrocks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zardozrocks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.175 as permitted sender) X-PHP-List-Original-Sender: zardozrocks@gmail.com X-Host-Fingerprint: 209.85.223.175 mail-ie0-f175.google.com Received: from [209.85.223.175] ([209.85.223.175:41156] helo=mail-ie0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/07-40418-A7698F45 for ; Thu, 05 Mar 2015 12:46:34 -0500 Received: by iecrd18 with SMTP id rd18so78464677iec.8 for ; Thu, 05 Mar 2015 09:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7FaD8uqbYzj8EVloNe8edTWVS5HVYArQiRvceJkZqv4=; b=h1VdYpq1/ntQaa5bGSE/oy0hTce6lcy+AWjrnfTiij5eAgv2tKrBduk2WdATar3/Ne Nfr2eUrmmNRQ+46vK6sFk+aNQlbOOgRrZeRMKPtK+vjBR9chNCmWBCTB130lEPHHkJ4d Q0kO98ZUW0QiFvLcpq3SciQLZIaxhGQW7UtwtRUkNZZW1JP9erZb6oZxf5VLQ2+u72NC MYKgl71YDpRsf4DktWiAPbeXJPBfIy/fuf1wGkwa/LoS/liBgVFPYPbI88mxgTQXMUMz rBhhtyd15rmVwicTzRSdgnZb3RuU57cCWUR66tZSns7ZeOhJkHjbUREBMwdjeYD8nEh9 VZwg== MIME-Version: 1.0 X-Received: by 10.107.162.10 with SMTP id l10mr22069683ioe.20.1425577591308; Thu, 05 Mar 2015 09:46:31 -0800 (PST) Received: by 10.107.137.196 with HTTP; Thu, 5 Mar 2015 09:46:31 -0800 (PST) In-Reply-To: <54F88E53.9030908@gmail.com> References: <54F88E53.9030908@gmail.com> Date: Thu, 5 Mar 2015 09:46:31 -0800 Message-ID: To: Rowan Collins , Rasmus Lerdorf Cc: internals Content-Type: multipart/alternative; boundary=001a1140d4b8ee0ae505108e2506 Subject: Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not? From: zardozrocks@gmail.com (j adams) --001a1140d4b8ee0ae505108e2506 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you so much for the generous clarity. Personally, I wish this sort of information was clearly visible in the docs. However, I don't want to introduce unnecessary complications there. Should I mention this to the docs team? It might help eliminate some of the speculative/incorrect information at the top of google search results. On Thu, Mar 5, 2015 at 9:11 AM, Rowan Collins wrote: > j adams wrote on 05/03/2015 16:12: > > I don't know if this is a question for the documentation team or not, bu= t >> figured I'd start here. There does not appear to be any definitive, clea= r, >> 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 =C2=BB >> 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=3D/full/path/to/opcache.so on non-Windows platforms, and >> zend_extension=3DC:\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 integrat= ed >> 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 an= d >> 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 brea= k > 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 th= e > 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 wa= y, > or enable them by default. They may for instance install the extensions a= s > shared libraries and offer a script to enable/disable them, or they may p= ut > 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] > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a1140d4b8ee0ae505108e2506--