Documentation

Installation

pvm currently supports x64 Windows only.

$ irm https://pvm.hjb.dev/install.ps1 | iex

You can still install manually by downloading the latest pvm.exe release, placing it in %UserProfile%\.pvm\bin (for example C:\Users\Harry\.pvm\bin), and adding that folder to your PATH.

Commands

List Versions

Will list out all the available PHP versions you have installed.

$ pvm list

List Remote Versions

Will list the PHP versions available for installation.

$ pvm list remote

Show Path

Will tell you what to put in your Path variable.

$ pvm bin

Use Version

Will switch your currently active PHP version to PHP 8.2.9:

$ pvm use 8.2.9
Note: Versions must have major.minor specified in the use command. If a .patch version is omitted, the newest available patch version is chosen.

Install Version

Will install PHP 8.2 at the latest patch:

$ pvm install 8.2
Note: The install command will automatically determine the newest minor/patch versions if they are not specified.

Manage Extensions

Will show regular and Zend extensions for the active PHP version, including whether each extension is enabled, disabled, available in ext, or missing from disk.

$ pvm extensions list

Will enable one or more extensions that already have entries in the active version's php.ini.

$ pvm extensions enable curl,openssl

Will disable an extension or Zend extension in the active version's php.ini.

$ pvm extensions disable xdebug

Composer Support

pvm now installs also composer with each php version installed. It will install Composer latest stable release for PHP >= 7.2 and Composer latest 2.2.x LTS for PHP < 7.2. You'll be able to invoke composer from terminal as it is intended:

$ composer --version

Build this project

To compile this project use:

$ bash ./build.sh

To override the embedded version for a release-style local build:

$ VERSION=1.2.1 bash ./build.sh

GitHub releases are built automatically from pushed tags and publish both pvm.exe and install.ps1 as release assets.