brew switch php version
snippet in php

brew switch php version

user8582

brew unlink php@7.4
brew link php@7.3

homebrew switch php version

user6778

$ brew unlink php@7.4
$ brew link php@8.0 --force --overwrite