Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.
- Install memcached. I'd suggest using homebrew.
brew install memcached
- Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
- Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
- Extract the source into
/Applications/MAMP/bin/php/[php version folder]/include/php
. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
/Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache
.