Skip to content
caduvarelaPublic

About

PHP version manager with per-project extensions. No sudo, no compiler. Linux, macOS, Windows.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

phpz

A PHP version manager with extensions that follow your projects.

phpz installing PHP 8.3 and using PHP 8.2 inside one project folder

CI License: MIT Linux, macOS and Windows

Install

# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/CaduVarela/phpz/master/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/CaduVarela/phpz/master/install.ps1 | iex

Or build it yourself with Rust: cargo install --path . && phpz setup.

Linux and Windows are tested. macOS builds and passes the tests, but nobody has installed PHP with it yet.

Everything lives in ~/.phpz. The PHP your system or web server uses is never touched.

One file per project

# .phpz.toml
php = "8.3"

[extensions]
enable = ["intl", "redis"]
disable = ["xdebug"]

Run php inside that folder and you get PHP 8.3 with those extensions. Everywhere else nothing changes.

Commands

phpz list --remote versions you can install
phpz install <version> install a version (--build compiles it on Linux)
phpz use [version] set the default, or the one this folder pins
phpz local <version> pin the current folder
phpz ext list | enable | disable | install manage extensions
phpz config set <key> <value> edit one php.ini setting
phpz composer install install or update Composer (phpz setup does it too)
phpz current what applies here

The full list is in the guide.

Guide · Design · Changelog · MIT license

About

PHP version manager with per-project extensions. No sudo, no compiler. Linux, macOS, Windows.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages