We are going to install PHP 7.3 in MacOS .First of all we need to install “Home brew”.For that copy and paste below given command in terminal and hit Enter.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once it is complete Run below given command just like before
brew install email@example.com
It will take some time ,Leave your computer for a while. Once all is done check php version in terminal using
If you see no change in php version then restart your computer , So that it can take effect
If you don’t want to install Homebrew then try this command
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3