PHP Help
Switching PHP Versions
Section titled “Switching PHP Versions”Switching PHP versions on your local machine is easy using brew.
-
Find current PHP version
Terminal window php -v -
Unlink current version
Terminal window brew unlink php# orbrew unlink php@version #e.g. brew unlink php@7.4 -
Install the desired version using brew
Terminal window brew install php@version #e.g. brew install php@7.4 -
Link the desired version
Terminal window brew link php@version #e.g. brew link php@7.4 -
Verify the version is now linked
Terminal window php -v