Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork185
Homebrew tap for PHP 5.6 to 8.6. PHP 8.6 is built nightly 🍺
License
MIT, BSD-2-Clause licenses found
Licenses found
shivammathur/homebrew-php
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
| 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 orphp@8.5 | php-debug orphp@8.5-debug | php-zts orphp@8.5-zts | php-debug-zts orphp@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 |
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 Sonoma | x86_64,arm64 |
| macOS Sequoia | x86_64,arm64 |
| macOS Tahoe | x86_64,arm64 |
- On macOS, install Xcode Command Line Utilities:
xcode-select --install
- On Linux, install cURL and Git:
# Using APTsudo apt-get install -y curl git# Using Yumsudo yum install -y curl git
- Install Homebrew:
/bin/bash -c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/main/install.sh)"- If previously installed, update homebrew and the formulae:
brew update
- If you have packages from old
homebrew/phptap, refer tothis guide for removing them.
Fetch the formulae in this tap:
brew tap shivammathur/php
SeePHP Support for available formulae.
- For example, to install
PHP 8.5:
brew install shivammathur/php/php@8.5
- After installing you have to link it:
brew link --overwrite --force shivammathur/php/php@8.5
- Restart the terminal and test your PHP version:
php -v
You can upgrade your PHP version to the latest patch release.
For example, to upgradePHP 8.5:
brew upgrade shivammathur/php/php@8.5
- If you have multiple PHP versions installed, you can switch between them easily.
For example, to switch toPHP 8.5:
brew link --overwrite --force shivammathur/php/php@8.5
- If you get a warning like below, then do as recommended:
Warning: Already linked:<Cellar Path>To relink: brew unlink<formula>&& brew link<formula>
brew unlink php@8.5brew link --overwrite --force shivammathur/php/php@8.5
If you are usingApache orNginx withphp-fpm, restart your webserver after any change in your PHP.
- For Apache (
httpd):
brew services restart httpd
- For Nginx:
brew services restart nginx
Make sure you ran
brew updatebefore installing PHP.Run
brew doctorand fix the warnings it reports.Make sure homebrew has correct permissions.
sudo chown -R"$(id -un)":"$(id -gn)"$(brew --prefix)
- If PHP is not working after a macOS update. Reinstall PHP along with its dependencies.
For example to reinstallPHP 8.5 and its dependencies:
brew reinstall$(brew deps shivammathur/php/php@8.5) shivammathur/php/php@8.5Check if your issue is a Homebrew'scommon issue.
If you are still facing an issue, please create a discussion threadhere.
The code in this project is licensed under theMIT license.Please see thelicense file for more information.
This project has somedependencies, and their license can be foundhere.
Contributions are welcome!Please seeContributor's Guide before you start.If you face any issues while using this tap or want to suggest a feature/improvement, create an discussion threadhere.
In addition to GitHub Actions, we useMacStadium for our CI infrastructure.


This project is generously supported by many other users and organisations viaGitHub Sponsors.
About
Homebrew tap for PHP 5.6 to 8.6. PHP 8.6 is built nightly 🍺
Topics
Resources
License
MIT, BSD-2-Clause licenses found
Licenses found
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors11
Uh oh!
There was an error while loading.Please reload this page.