I am finding it tricky to enable OPcache on my MacOS Sierra (10.12.6) system.
php --ini shows the ini file used:
Configuration File (php.ini) Path: /usr/local/etc/php/7.0 Loaded Configuration File: /usr/local/etc/php/7.0/php.ini Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d Additional .ini files parsed: /usr/local/etc/php/7.0/conf.d/ext-pdo_pgsql.ini My php.ini looks like this:
[opcache] ; Determines if Zend OPCache is enabled opcache.enable=1 However, when I look at phpinfo() it shows the following:

I've restarted Apache after making the change to my php.ini to include opcache, but it doesn't appear to be recognised.
I installed PHP with Homebrew, not MAMP although I do have MAMP install but unused.
php.inifile did you edit? The CLI config file is in/usr/local/etc/, but your Apache config file is in/usr/local/php5/lib/.