Switch from latest PHP (might be 8.2) to 7.4
brew unlink php && brew link php@7.4 --force --overwrite && php -v
Switch from PHP 7.4 to latest PHP (might be 8.2)
brew unlink php@7.4 && brew link php --force --overwrite && php -v
Check the PHP version with
php -v
php please clear:stache
php please clear:static
php please clear:cache