https://github.com/stichoza/pvm
PHP Version Manager for MAMP Pro (CLI)
https://github.com/stichoza/pvm
Last synced: 9 months ago
JSON representation
PHP Version Manager for MAMP Pro (CLI)
- Host: GitHub
- URL: https://github.com/stichoza/pvm
- Owner: Stichoza
- License: mit
- Created: 2021-12-08T14:17:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-08T20:07:25.000Z (over 4 years ago)
- Last Synced: 2025-06-07T04:33:17.327Z (about 1 year ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PVM - PHP Version Manager for MAMP Pro
Manages PHP versions for command line. Works with **zsh** autocomplete.
### Installation
Clone this repository anywhere on you computer and add `source path/to/pvm/pvm.sh` to your zsh config file (`~/.zshrc` in most cases).
### Usage
- `pvm list` Show installed PHP versions
- `pvm use 8.1.0` Switch current PHP binary version
- `pvm 8.1.0` Run specific PHP version
- `pvm 8.1.0 file.php` Run file with specific PHP version
- `pvm 8.1.0 -r "echo time()"` Run script from string with specific PHP version
- `pvm 8.1.0 -S 0.0.0.0:8080` Start PHP 8.1.0 server on port 8080
- *and so on...*
### Example
```
> php -v
PHP 7.4.21
> pvm use 8.1.0
Using PHP 8.1.0 version.
> php -v
PHP 8.1.0
```