Brew Instale o PHP com versão específica
Then choose your version.
brew install [email protected]
Link the PHP version.
brew link --force --overwrite [email protected]
Lokesh003