PVM - Manage multiple PHP versions with ease

by
Fast, zero-dependency PHP version manager for Windows, macOS, and Linux.

Add a comment

Replies

Best

👋 Hi Product Hunt!

I'm excited to share PVM (PHP Version Manager), an open source project I've been building.

As a PHP developer, I constantly switch between projects that require different PHP versions. Every time, I found myself downloading PHP, updating PATH variables, and spending more time configuring my environment than actually coding.

I thought, why isn't this as simple as nvm is for Node.js?

So I built PVM—a cross-platform PHP Version Manager that makes installing, switching, and managing PHP versions effortless on Windows, macOS, and Linux.

Today, PVM lets you:

  • ✅ Install multiple PHP versions

  • ✅ Download official PHP builds automatically

  • ✅ Switch versions with a single command

  • ✅ Manage versions side by side

  • ✅ Works on Windows, macOS, and Linux

  • ✅ No more manual PATH editing

pvm install 8.3
pvm use 8.3
php -v


This is just the beginning. My goal is to make PVM the easiest way to manage PHP versions across every platform, with upcoming features like project-specific version switching, extension management, and an even smoother developer experience.

I'd love to hear what you think! If you work with PHP, what features would you like to see next? Your feedback, ideas, and contributions are always welcome. 🚀

One thing I'd love to see is a built-in command to switch PHP versions per project via a `.php-version` file in the repo root. Would make onboarding teammates way smoother when working across multiple codebases with different PHP requirements.

 Absolutely! That's actually on my roadmap. I plan to support project-specific version files (like .php-version) so PVM can automatically use the correct PHP version when working in a project. I agree—it would make onboarding and switching between multiple codebases much smoother.

Finally a PHP version manager that does not slow down my workflow. Zero dependencies is such a nice touch.

the php-git oneliner setup saved me an afternoon of fiddling with my old docker setup. really nice work

Does it handle switching PHP versions automatically based on the project directory, or do I have to run a command every time I cd into something?

 Not yet, but it's on my roadmap. I'll be working on automatic per-project PHP version switching soon, so you won't need to run a command every time you change directories.

This came in handy on a windows machine where switching php versions was always a headache. The setup was painless and it just worked from the terminal.

 Thanks

How does pvm handle existing PHP installations on the system, and does it play nicely with composer or pecl extensions without breaking them?

 PVM doesn't modify or overwrite your existing PHP installations. It installs and manages its own PHP versions, making it easy to switch between them without affecting your system setup.

It also works well with Composer since Composer simply uses the active PHP version. PECL extensions are version-specific, so they need to be installed for each PHP version, just as they would with any other PHP version manager. My goal is to keep PVM isolated and predictable without breaking existing environments.