Manages PHP versions for command line. Works with zsh autocomplete.
Clone this repository anywhere on you computer and add source path/to/pvm/pvm.sh to your zsh config file (~/.zshrc in most cases).
pvm listShow installed PHP versionspvm use 8.1.0Switch current PHP binary versionpvm 8.1.0Run specific PHP versionpvm 8.1.0 file.phpRun file with specific PHP versionpvm 8.1.0 -r "echo time()"Run script from string with specific PHP versionpvm 8.1.0 -S 0.0.0.0:8080Start PHP 8.1.0 server on port 8080- and so on...
> php -v
PHP 7.4.21
> pvm use 8.1.0
Using PHP 8.1.0 version.
> php -v
PHP 8.1.0