downgrade php 8 to 7.4 mac code example
Example 1: downgrade php 7.4 to 7.3 mac
brew install php@7.3
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
php --version
php --ini
Example 2: brew switch php version
brew unlink php@7.4
brew link php@7.3
Example 3: homebrew switch php version
$ brew unlink php@7.4
$ brew link php@8.0 --force --overwrite
Example 4: brew downgrade php 8 to 7.4
$ brew unlink php@7.1
$ brew link php@7.4 --force --overwrite