Homebrew tap for PHP releases.
PHP Version | Formula |
---|---|
PHP 5.6 |
php@5.6 |
PHP 7.0 |
php@7.0 |
PHP 7.1 |
php@7.1 |
PHP 7.2 |
php@7.2 |
PHP 7.3 |
php@7.2 |
PHP 7.4 |
php or php@7.4 |
PHP 8.0.0-dev |
php@8.0 |
PHP 8.1.0-dev |
php@8.1 |
Update brew and the formulae before installing PHP.
brew update
Fetch the formulae in this tap.
brew tap shivammathur/php
See PHP Support for available formulae.
For example, to install PHP 7.3
.
# Install PHP 7.3
brew install shivammathur/php/php@7.3
# Link PHP 7.3
brew link --overwrite --force php@7.3
Upgrade your PHP version to the latest patch release.
For example, to upgrade PHP 7.3
.
brew upgrade shivammathur/php/php@7.3
If you have multiple PHP versions installed, you can switch between them easily.
For example, to switch to PHP 7.3
.
brew link --overwrite --force php@7.3
The code in this project is licensed under the MIT license. Please see the license file for more information.
Formulae for PHP versions which are supported currently in the PHP release cycle are synced from homebrew-core tap and their license can be found here.
Contributions are welcome! Please see Contributor's Guide before you start. If you face any issues while using this or want to suggest a feature/improvement, create an issue here.