This repository was created to centralize PHP releases for both Linux, macOS, and Windows, ensuring consistency and ease of access.
PHP releases are published separately on two different platforms:
- php.net for Linux, macOS
- windows.php.net for Windows
Additionally, Windows ZIP archives follow inconsistent naming conventions, making it difficult to automate version tracking and distribution.
This repository auto matically monitors new PHP releases and generates a executable for each version. Each release includes:
- Linux x86_64 build (built with static-php-cli bulk variant)
- Linux aarch64 build (built with static-php-cli bulk variant)
- macOS x86_64 build (built with static-php-cli bulk variant)
- macOS aarch64 build (built with static-php-cli bulk variant)
- Windows x86_64 build (built with static-php-cli spc-max variant)
The repository is compatible with ubi.
It is recommended to install the binaries via mise-en-place.
Warning
The ubi backend has been deprecated in newer Mise-en-Place releases; it's recommended to use the github backend instead, although it is still under development.
# Latest PHP major
mise use ubi:verzly/php@latest
# Latest PHP 8 minor, patch
mise use ubi:verzly/php@8
# Latest PHP 8.4 patch
mise use ubi:verzly/php@8.4
# Only PHP 8.4.3 patch
mise use ubi:verzly/php@8.4.3
# Check installed PHP versions
mise ls ubi:verzly/php
# Change globally selected PHP version
mise use -g ubi:verzly/php@8 # or latest or 8.4 or 8.4.3
# Check current PHP version
php --versionIt is recommended to install the binaries via mise-en-place.
Install it as a PHP alias to avoid constantly using the long backend reference. It's important to set the alias before installing the first PHP version; otherwise, mise ls will list your PHP versions in two separate entries (it won't handle the original name and the alias together).
mise plugin rm php
mise config set tool_alias.php github:verzly/phpWarning
Unfortunately, it currently only works with full version numbers. See more: jdx/mise#8215
# [CURRENTLY UNAVAILABLE] Latest PHP major - See warning above.
mise use php@latest
# [CURRENTLY UNAVAILABLE] Latest PHP 8 minor, patch - See warning above.
mise use php@8
# [CURRENTLY UNAVAILABLE] Latest PHP 8.4 patch - See warning above.
mise use php@8.4
# Only PHP 8.4.3 patch
mise use php@8.4.3
# Check installed PHP versions
mise ls php
# Change globally selected PHP version
mise use -g php@8.4.3
# Check current PHP version
php --versionYou can find all available versions in the Releases Section.
If you notice a missing release or any issues with the packages, please open an issue to let us know.
In the case of Composer, it is very rare to require different versions. Therefore, instead of collecting multiple versions, we can install the official Composer using a single script without any extra steps.
Linux & macOS
bash <(curl -fsSL https://raw.githubusercontent.com/verzly/php/master/composer/install.sh)Windows
powershell -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/verzly/php/master/composer/install.ps1'))"To update or install a specific version, we can use Composer's built-in self-update command:
# Latest Composer major
composer self-update
# Latest Composer 2 minor, patch
composer self-update 2
# Latest Composer 2.7 patch
composer self-update 2.7
# Only Composer 2.7.9 patch
composer self-update 2.7.9
# Roll back to the previous version
composer self-update --rollback
# Update to latest preview/RC version
composer self-update --preview
# Update to latest snapshot/development version
composer self-update --snapshot
# Check current Composer version
composer --version