phpenv
A PHP version manager for development purposes. tldr-pages
On several platforms
Several platforms
Install a PHP version globally
phpenv install versionIdentifyRefresh shim files for all PHP binaries known to phpenv
phpenv rehashIdentifyList all installed PHP versions
phpenv versionsIdentifyDisplay the currently active PHP version
phpenv versionIdentifySet the global PHP version
phpenv global versionIdentifySet the local PHP version, which overrides the global version
phpenv local versionIdentifyUnset the local PHP version
phpenv local --unsetIdentify