Installing/Change PHP on your Mac

First, unlink the version you want using the following command Then link your desired version using the following command brew link php@7.4 Ref: https://daily-dev-tips.com/posts/installing-php-on-your-mac/