homebrew switch php version
snippet in php

homebrew switch php version

user6269

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