For me, the valet use php@7.3
command does not work.
And so I created this bash function.
I already have PHP versions 7.2, 7.3 and 7.4 installed via Homebrew.
Add this function in your .bash_profile
or .zshrc
file:
# Switch PHP version
switch-php() {