Brew should not know about the php in the MAMP package.... but anyway, unless you find someone using Mac in this forum, willing to explore those issues with you, I suggest you try a more general php developer forum to walk you through your issue. In my experience, php setup is a non-issue on Linux systems; once I did miss intl extension on one computer, but it was easily solved by installing that particular extension via apt-get
==
Donatas G.