You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.
Brew PHP switcher is a simple script to switch your Apache and CLI configs quickly between major versions of PHP.
If you support multiple products/projects that are built using either brand new or old legacy PHP functionality and you find it a pain to change config files continually this will make the whole process just one command.
Caveats
For users of OSX only who have installed PHP via Homebrew and for PHP version 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 and 8.0 only.
Your Apache config must have native osx PHP module commented out.
Where 5.6 exists, please replace with syntax of 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 or 8.4 depending on which version is required.
brew-php-switcher 5.6
by default will switch apache config
Options
-s|-s=* Skips apache & valet config switch for i.e
# skip apache only
brew-php-switcher 5.6 -s
# skip valet only
brew-php-switcher 5.6 -s=valet
# skip valet & apache
brew-php-switcher 5.6 -s=valet,apache
-c=* switch a specific config for i.e
# switch valet config only
brew-php-switcher 5.6 -c=valet
# switch valet & apache config only
brew-php-switcher 5.6 -c=valet,apache
# switch apache config only
brew-php-switcher 5.6 -c=apache
License
MIT
About
Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.