From d19444595a8e763ad9426627d91f5c6c24fac591 Mon Sep 17 00:00:00 2001 From: COil Date: Fri, 29 Oct 2021 13:51:34 +0200 Subject: [PATCH] brew: examples for manual PHP version switch --- _posts/01-04-01-Mac-Setup.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/_posts/01-04-01-Mac-Setup.md b/_posts/01-04-01-Mac-Setup.md index bf3b45d..302b34c 100644 --- a/_posts/01-04-01-Mac-Setup.md +++ b/_posts/01-04-01-Mac-Setup.md @@ -17,6 +17,18 @@ brew install php@8.0 You can switch between Homebrew PHP versions by modifying your `PATH` variable. Alternatively, you can use [brew-php-switcher][brew-php-switcher] to switch PHP versions automatically. +You can also switch between PHP versions manually by unlinking and linking the wanted version: + +``` +brew unlink php +brew link --overwrite php@7.4 +``` + +``` +brew unlink php +brew link --overwrite php@8.0 +``` + ### Install PHP via Macports The [MacPorts] Project is an open-source community initiative to design an