6

I read all over internet that APC will be included in PHP6. However the PHP6 project was cancelled and they skipped one major version to avoid confusion, which then again causes more confusion. This however is another discussion for another time.

My question is:

Will APC or any other cache module still be introduced, included and enabled by default in PHP7?

The reason why I am asking is because I am considering implementing memcached into my projects. But if there is a native cache solution in PHP7 i'd rather stick to that.

Junior
  • 671
  • 3
  • 9
  • 24
  • I'm under the impression APC is discontinued all together.... And if I understand the question correctly you're not looking for just any cache module but one that let's you store arbitrary data blocks like apc_store does.? – VolkerK Nov 03 '15 at 10:24
  • @VolkerK Correct. Its mainly to store mysql query results to reduce load and increase performance. – Junior Nov 03 '15 at 10:25
  • 1
    Looks like [APCu](https://github.com/krakjoe/apcu) is PHP7 ready. It's a continuation of APC without the opcache (which is redundant with the opcache brought in in PHP 5.5). – El Yobo Nov 20 '15 at 00:48
  • 1
    For the performance part there is no longer any reason to use APC since PHP by default now stores precompiled script bytecode in memory due to it's OpCache feature. – TheStoryCoder Aug 19 '16 at 06:05
  • The `pecl install apc` is broken for PHP 7. But `sudo yum install pecl-php-apc` works because it links up APCu instead. – phpguru Dec 15 '16 at 20:19

1 Answers1

1

PHP 7 has a built-in opcache, APC is deprecated and will not work.

Enabling PHP7 Opcache

Reference: http://php.net/manual/en/intro.opcache.php

PECL Extension: @ https://pecl.php.net/package/ZendOpcache

Michael Mikhjian
  • 2,760
  • 4
  • 36
  • 51
  • 1
    APC(u) is not about opcache (it has been removed long time ago). It is about data caching as it provides simple and extremely fast key-value storage in shared memory. – Josef Kufner Aug 03 '17 at 10:25
  • @JosefKufner, that is correct. APC is mentioned (the cache + key/value) and memcache is mentioned (the key value storage). Many folks don't understand the difference between APC / APCu / etc. I'll be updating my answer to note the answer is for the cache layer, I assume there is a high click through for "apc cache php7", which this question seems to yield. – Michael Mikhjian Aug 03 '17 at 14:21