Install php
brew install [email protected]
Install the required PHP to your PATH
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
Then make sure it’s all working
php -v
php --version
This command will show you where your ini file is loaded
php --ini