Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Homebrew tap for PHP 5.6 to 8.6. PHP 8.6 is built nightly 🍺

License

MIT, BSD-2-Clause licenses found

Licenses found

MIT
LICENSE
BSD-2-Clause
LICENSE_HOMEBREW
NotificationsYou must be signed in to change notification settings

shivammathur/homebrew-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Homebrew Tap for PHP

brew tap shivammathur/php

Build statusTest statusLICENSEPHP Versions Supported

Linux architectures supportedmacOS architectures supportedmacOS architectures supported

PHP Support

PHP VersionNTS FormulaDebug FormulaZTS FormulaDebug ZTS Formula
PHP 5.6php@5.6php@5.6-debugphp@5.6-ztsphp@5.6-debug-zts
PHP 7.0php@7.0php@7.0-debugphp@7.0-ztsphp@7.0-debug-zts
PHP 7.1php@7.1php@7.1-debugphp@7.1-ztsphp@7.1-debug-zts
PHP 7.2php@7.2php@7.2-debugphp@7.2-ztsphp@7.2-debug-zts
PHP 7.3php@7.3php@7.3-debugphp@7.3-ztsphp@7.3-debug-zts
PHP 7.4php@7.4php@7.4-debugphp@7.4-ztsphp@7.4-debug-zts
PHP 8.0php@8.0php@8.0-debugphp@8.0-ztsphp@8.0-debug-zts
PHP 8.1php@8.1php@8.1-debugphp@8.1-ztsphp@8.1-debug-zts
PHP 8.2php@8.2php@8.2-debugphp@8.2-ztsphp@8.2-debug-zts
PHP 8.3php@8.3php@8.3-debugphp@8.3-ztsphp@8.3-debug-zts
PHP 8.4php@8.4php@8.4-debugphp@8.4-ztsphp@8.4-debug-zts
PHP 8.5php orphp@8.5php-debug orphp@8.5-debugphp-zts orphp@8.5-ztsphp-debug-zts orphp@8.5-debug-zts
PHP 8.6.0-devphp@8.6php@8.6-debugphp@8.6-ztsphp@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.

OS Support

Operating SystemArchitecture
Linuxx86_64,arm64
macOS Sonomax86_64,arm64
macOS Sequoiax86_64,arm64
macOS Tahoex86_64,arm64

Usage

Prerequisites

  • 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 oldhomebrew/php tap, refer tothis guide for removing them.

Add this tap

Fetch the formulae in this tap:

brew tap shivammathur/php

Install PHP

SeePHP Support for available formulae.

  • For example, to installPHP 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

Upgrade your PHP version

You can upgrade your PHP version to the latest patch release.

For example, to upgradePHP 8.5:

brew upgrade shivammathur/php/php@8.5

Switch between PHP versions

  • 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

Restart your webserver

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

Debugging

  • Make sure you ranbrew update before installing PHP.

  • Runbrew doctor and 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.5
  • Check if your issue is a Homebrew'scommon issue.

  • If you are still facing an issue, please create a discussion threadhere.

License

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

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.

Sponsors

In addition to GitHub Actions, we useMacStadium for our CI infrastructure.

Mac StadiumMac Stadium

This project is generously supported by many other users and organisations viaGitHub Sponsors.

Sponsor shivammathur

Related Projects

Dependencies

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

MIT
LICENSE
BSD-2-Clause
LICENSE_HOMEBREW

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors11

Languages


[8]ページ先頭

©2009-2025 Movatter.jp