Is there any compatible memory cache for PHP 7?

I'd suggest using Memcached, especially if you're concerned about performance.

Whilst you are correct that APC(u) is a lot faster than Memcache, you're not taking into the account that by the time you're worrying about these metrics, you will be running across multiple servers and APC(u) cannot be shared across nodes.

You can use a single Memcache instance or cluster to serve as many application servers as you want. Scalability is a greater concern in modern application development than "how much performance can I squeeze out of one server?"

Having said that, your alternative is APCu, which has all of the functionality that you're used to from APC. It is marked as stable with PHP7 but I wouldn't recommend this because of its single-node nature & inability to work correctly with fastcgi.


APCU is literally APC without the code caching (they took the APC code, removed the byte-code cache and released it as APCU). It's a drop-in replacement. Exactly as APC's user-cache, it keeps the data in the same process as the PHP runtime, and so using the value is like much like retrieving an ordinary variable, hence the speed.