A PHP version manager with extensions that follow your projects.
# 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 | iexOr 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.
# .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.
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.