First of all, copy below code then paste terminal then enter finally done
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
Remove original homebrew/php tap
brew untap homebrew/tap
Check install information
brew info nginx
Check software versions
brew search php
Install software
brew install php@7.4
Uninstall software
brew uninstall php@7.4
Check software list
brew list