Do it manually:
1- nano /Applications/MAMP/bin/php/php5.6.2/conf/php.ini
NOTE: "php5.6.2" on the path should be changed to the php version
you'll be using.
2- Look for the section:
[OPcache]
;zend_extension="/Applications/MAMP/bin/php/php5.6.2/lib/php/extensions/no-debug-non-zts-20131226/opcache.so"
3- Remove the colon (;) so that section reads:
[OPcache]
zend_extension="/Applications/MAMP/bin/php/php5.6.2/lib/php/extensions/no-debug-non-zts-20131226/opcache.so"
4- Save (Ctrl-O) + Enter
and quit (Ctrl-X)
Enjoy.
When running PHP scripts from the Console (CLI) you will need to
specify the PHP binary you want to use since by default php will be
the default PHP included with OS X, not the one installed with MAMP.
So instead of:
user$ php script.php
try:
user$ /Applications/MAMP/bin/php/php5.6.2/bin/php script.php