list php version mac code example
Example 1: brew switch php version
brew unlink php@7.4
brew link php@7.3
Example 2: check php version mac
In terminal write:
> php -v
Example 3: homebrew switch php version
$ brew unlink php@7.4
$ brew link php@8.0 --force --overwrite