brew downgrade php 8 to 7.4 code example
Example 1: downgrade php 7.4 to 7.3 mac
#Install php version 7.3
brew install [email protected]
#Install the required PHP to your PATH
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
#Check Version
php --version
#Show you where your ini file is loaded
php --ini
Example 2: brew downgrade php 8 to 7.4
$ brew unlink [email protected]
$ brew link [email protected] --force --overwrite