Homebrew tap for PHP 5.6 to 8.7. PHP 8.6 and 8.7 are built nightly 🍺
See the code| PHP Version | NTS Formula | Debug Formula | ZTS Formula | Debug ZTS Formula |
|---|---|---|---|---|
| PHP 5.6 | php@5.6 | php@5.6-debug | php@5.6-zts | php@5.6-debug-zts |
| PHP 7.0 | php@7.0 | php@7.0-debug | php@7.0-zts | php@7.0-debug-zts |
| PHP 7.1 | php@7.1 | php@7.1-debug | php@7.1-zts | php@7.1-debug-zts |
| PHP 7.2 | php@7.2 | php@7.2-debug | php@7.2-zts | php@7.2-debug-zts |
| PHP 7.3 | php@7.3 | php@7.3-debug | php@7.3-zts | php@7.3-debug-zts |
| PHP 7.4 | php@7.4 | php@7.4-debug | php@7.4-zts | php@7.4-debug-zts |
| PHP 8.0 | php@8.0 | php@8.0-debug | php@8.0-zts | php@8.0-debug-zts |
| PHP 8.1 | php@8.1 | php@8.1-debug | php@8.1-zts | php@8.1-debug-zts |
| PHP 8.2 | php@8.2 | php@8.2-debug | php@8.2-zts | php@8.2-debug-zts |
| PHP 8.3 | php@8.3 | php@8.3-debug | php@8.3-zts | php@8.3-debug-zts |
| PHP 8.4 | php@8.4 | php@8.4-debug | php@8.4-zts | php@8.4-debug-zts |
| PHP 8.5 | php or php@8.5 | php-debug or php@8.5-debug | php-zts or php@8.5-zts | php-debug-zts or php@8.5-debug-zts |
| PHP 8.6.0-dev | php@8.6 | php@8.6-debug | php@8.6-zts | php@8.6-debug-zts |
| PHP 8.7.0-dev | php@8.7 | php@8.7-debug | php@8.7-zts | php@8.7-debug-zts |
For each PHP version, we have formulae with thread-safety support (zts) and debug symbols support (debug) and both (debug-zts) as well.
The formulae with debug symbols can be used when building or debugging PHP extensions and are not recommended for production usage.
The formulae with thread-safety support can be used with applications that require multi-threading support.
| Operating System | Architecture |
|---|---|
| Linux | x86_64, arm64 |
| macOS Sequoia | arm64 |
| macOS Tahoe | arm64 |
| macOS Golden Gate | arm64 |
macOS Intel is not supported.
xcode-select --install
# Using APT
sudo apt-get install -y curl git
# Using Yum
sudo yum install -y curl git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/main/install.sh)"
brew update
homebrew/php tap, refer to this guide for removing them.Fetch the formulae in this tap and mark the tap trusted:
brew tap shivammathur/php
brew trust shivammathur/php
See PHP Support for available formulae.
PHP 8.5:brew install shivammathur/php/php@8.5
brew link --overwrite --force shivammathur/php/php@8.5
php -v
You can upgrade your PHP version to the latest patch release.
For example, to upgrade PHP 8.5:
brew upgrade shivammathur/php/php@8.5
For example, to switch to PHP 8.5:
brew link --overwrite --force shivammathur/php/php@8.5
Warning: Already linked: <Cellar Path>
To relink:
brew unlink <formula> && brew link <formula>
brew unlink php@8.5
brew link --overwrite --force shivammathur/php/php@8.5
If you are using Apache or Nginx with php-fpm, restart your webserver after any change in your PHP.
httpd):brew services restart httpd
brew services restart nginx
Make sure you ran brew update before installing PHP.
Run brew doctor and fix the warnings it reports.
Make sure homebrew has correct permissions.
sudo chown -R "$(id -un)":"$(id -gn)" $(brew --prefix)
For example to reinstall PHP 8.5 and its dependencies:
brew reinstall $(brew deps shivammathur/php/php@8.5) shivammathur/php/php@8.5
Check if your issue is a Homebrew's common issue.
If you are still facing an issue, please create a discussion thread here.
The code in this project is licensed under the MIT license. Please see the license file for more information.
This project has some dependencies, 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 tap or want to suggest a feature/improvement, create an discussion thread here.
In addition to GitHub Actions, we use MacStadium for our CI infrastructure.
This project is generously supported by many other users and organisations via GitHub Sponsors.
194 followers · starred Jul 2022
201 followers · starred Oct 2021
452 followers · starred May 2024
484 followers · starred Oct 2024
Homebrew tap for PHP 5.6 to 8.7. PHP 8.6 and 8.7 are built nightly 🍺
See the code| PHP Version | NTS Formula | Debug Formula | ZTS Formula | Debug ZTS Formula |
|---|---|---|---|---|
| PHP 5.6 | php@5.6 | php@5.6-debug | php@5.6-zts | php@5.6-debug-zts |
| PHP 7.0 | php@7.0 | php@7.0-debug | php@7.0-zts | php@7.0-debug-zts |
| PHP 7.1 | php@7.1 | php@7.1-debug | php@7.1-zts | php@7.1-debug-zts |
| PHP 7.2 | php@7.2 | php@7.2-debug | php@7.2-zts | php@7.2-debug-zts |
| PHP 7.3 | php@7.3 | php@7.3-debug | php@7.3-zts | php@7.3-debug-zts |
| PHP 7.4 | php@7.4 | php@7.4-debug | php@7.4-zts | php@7.4-debug-zts |
| PHP 8.0 | php@8.0 | php@8.0-debug | php@8.0-zts | php@8.0-debug-zts |
| PHP 8.1 | php@8.1 | php@8.1-debug | php@8.1-zts | php@8.1-debug-zts |
| PHP 8.2 | php@8.2 | php@8.2-debug | php@8.2-zts | php@8.2-debug-zts |
| PHP 8.3 | php@8.3 | php@8.3-debug | php@8.3-zts | php@8.3-debug-zts |
| PHP 8.4 | php@8.4 | php@8.4-debug | php@8.4-zts | php@8.4-debug-zts |
| PHP 8.5 | php or php@8.5 | php-debug or php@8.5-debug | php-zts or php@8.5-zts | php-debug-zts or php@8.5-debug-zts |
| PHP 8.6.0-dev | php@8.6 | php@8.6-debug | php@8.6-zts | php@8.6-debug-zts |
| PHP 8.7.0-dev | php@8.7 | php@8.7-debug | php@8.7-zts | php@8.7-debug-zts |
For each PHP version, we have formulae with thread-safety support (zts) and debug symbols support (debug) and both (debug-zts) as well.
The formulae with debug symbols can be used when building or debugging PHP extensions and are not recommended for production usage.
The formulae with thread-safety support can be used with applications that require multi-threading support.
| Operating System | Architecture |
|---|---|
| Linux | x86_64, arm64 |
| macOS Sequoia | arm64 |
| macOS Tahoe | arm64 |
| macOS Golden Gate | arm64 |
macOS Intel is not supported.
xcode-select --install
# Using APT
sudo apt-get install -y curl git
# Using Yum
sudo yum install -y curl git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/main/install.sh)"
brew update
homebrew/php tap, refer to this guide for removing them.Fetch the formulae in this tap and mark the tap trusted:
brew tap shivammathur/php
brew trust shivammathur/php
See PHP Support for available formulae.
PHP 8.5:brew install shivammathur/php/php@8.5
brew link --overwrite --force shivammathur/php/php@8.5
php -v
You can upgrade your PHP version to the latest patch release.
For example, to upgrade PHP 8.5:
brew upgrade shivammathur/php/php@8.5
For example, to switch to PHP 8.5:
brew link --overwrite --force shivammathur/php/php@8.5
Warning: Already linked: <Cellar Path>
To relink:
brew unlink <formula> && brew link <formula>
brew unlink php@8.5
brew link --overwrite --force shivammathur/php/php@8.5
If you are using Apache or Nginx with php-fpm, restart your webserver after any change in your PHP.
httpd):brew services restart httpd
brew services restart nginx
Make sure you ran brew update before installing PHP.
Run brew doctor and fix the warnings it reports.
Make sure homebrew has correct permissions.
sudo chown -R "$(id -un)":"$(id -gn)" $(brew --prefix)
For example to reinstall PHP 8.5 and its dependencies:
brew reinstall $(brew deps shivammathur/php/php@8.5) shivammathur/php/php@8.5
Check if your issue is a Homebrew's common issue.
If you are still facing an issue, please create a discussion thread here.
The code in this project is licensed under the MIT license. Please see the license file for more information.
This project has some dependencies, 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 tap or want to suggest a feature/improvement, create an discussion thread here.
In addition to GitHub Actions, we use MacStadium for our CI infrastructure.
This project is generously supported by many other users and organisations via GitHub Sponsors.
194 followers · starred Jul 2022
201 followers · starred Oct 2021
452 followers · starred May 2024
484 followers · starred Oct 2024