PVM is a simple and effective PHP Version Manager built on top of shivammathur/php. It allows you to easily install, switch, and manage multiple PHP versions using Homebrew — with optional Xdebug support.
brew tap shuvo7670/pvm
brew install pvmpvm [command] [version]pvm install [version]Installs the specified PHP version (e.g., 8.3, 8.2).
pvm use [version]Switches to the specified PHP version by unlinking all others.
pvm uninstall [version]Uninstalls the specified PHP version.
pvm listLists all available PHP versions from the shivammathur/php tap.
pvm currentDisplays the currently active PHP version.
pvm version
pvm -v
pvm --versionShows the current installed version of pvm.
pvm xdebug enableInstalls and enables Xdebug via PECL for the current PHP version.
pvm xdebug disableRemoves all Xdebug-related configuration from the active php.ini.
pvm xdebug statusPrints whether Xdebug is currently enabled or disabled.
pvm helpShows help menu with all available commands.
pvm install 8.2
pvm use 8.2
pvm xdebug enable
php -vFeel free to fork, submit issues, or create pull requests to improve pvm!