I am trying to install PHP on my MAC machine using Homebrew.
I am using the following command:
brew install php
However, I am getting the following errors:
After installing PHP with brew,
brew install php@7.3
or any version you need(could be: php@7.2)
run this command to ensure you have PHP installed: brew list | grep php
then you need to manually add an alias as follows:
alias php='/usr/local/Cellar/php@7.3/7.3.13/bin/php'
Then, for the change to take effect you need to refresh your terminal. You can use: source ~/.bash_profile
command, or close and open terminal.