How to use Memcached with PHP7?

You need to use the php7 branch; see here, Travis is passing.

This should be the complete set of steps to install the memcached extension on a Debian/Ubuntu OS:

sudo apt-get update
sudo apt-get install -y libmemcached-dev libmemcached11 git build-essential

git clone https://github.com/php-memcached-dev/php-memcached
cd php-memcached
git checkout php7
git pull

/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config

make
sudo make install

You may need to change some of the paths if you have them installed at different locations.

Leave a Comment