tuc0w / homebrew-php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Support

PHP Version Formula
PHP 8.2.0 php@8.2
PHP 8.2.1 php@8.2
PHP 8.2.2 php@8.2
PHP 8.2.3 php@8.2
PHP 8.2.4 php@8.2
PHP 8.2.5 php@8.2
PHP 8.2.6 php@8.2
PHP 8.2.7 php@8.2
PHP 8.2.8 php@8.2
PHP 8.2.9 php@8.2
PHP 8.2.10 php@8.2
PHP 8.2.11 php@8.2
PHP 8.2.12 php@8.2
PHP 8.2.13 php@8.2
PHP 8.2.14 php@8.2
PHP 8.2.15 php@8.2

Usage

  • On macOS, install Xcode Command Line Utilities:
xcode-select --install
  • On Linux, install cURL and Git:
# Using APT
sudo apt-get install -y curl git
# Using Yum
sudo yum install -y curl git
  • Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • If previously installed, update homebrew and the formulae:
brew update
  • If you have packages from old homebrew/php tap remove them.

Add this tap

Fetch the formulae in this tap:

brew tap tuc0w/php

Install PHP

See PHP Support for available formulae.

  • For example, to install PHP 8.2.12:
HOMEBREW_PHP_VERSION="8.2.12" brew install tuc0w/php/php@8.2
  • After installing you have to link it:
brew link --overwrite --force tuc0w/php/php@8.2
  • If you need to have php@8.2 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/php@8.2/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/php@8.2/sbin:$PATH"' >> ~/.zshrc
  • Restart the terminal or run source ~/.zshrc and test your PHP version:
php -v

About

License:MIT License


Languages

Language:Ruby 100.0%