I've had a problem since version 6 
When we set this to opcache, it won't be saved on the next restart we see it says unsaved changes want to start? if you say yes it will still load opcache but as soon as you save it, it will be off again.
That actually means it was saved but cause of a bug, Mamp Pro UI isn't able to load that to its own UI.
So how to get rid of that warning everytime we restart the system or mac itself?
As I mentioned this is a bug in MAMP PRO making mamp unable to understand that opcache is actually on, it thinks it's off and when you save the changes it will literally get off. We can leave that to off, but enable opcache ourselves, that way everything will be solved.
First click on Open template so you can open php.ini for your current php version.
First copy the whole content of this file and get yourself a backup of it.
in the opened editor you can search for opcache and you'll find a section about it, comment it all and enable the options you want, make sure you set
opcache.enable=1Now from the second line of the above block, you can find
That's what we need to enable opcache manually just omit
;MAMP_OPcache_MAMPand you'll get something likeGreat, all you have to do now is to put this at the end of your editor.
Close the editor and save it, now turn off the opcache in the UI if it's on, and you'll still have it on, you won't get an annoying warning and saving won't turn it off anymore.
If you ever wanted to disable opcache just comment that last line that you added in the editor.