Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (31 sloc) 1.16 KB


rbenv based version managment for PHP.

This is a small install script which sets up rbenv in a separate directory for PHP versioning.


You need Git installed.


Clone this repository and run the on your shell. Then add ~/.phpenv/bin to your PATH and add eval $(phpenv init -) to your .bashrc.

For rbenv users: Make sure that ~/.rbenv/bin takes precedence in the PATH over ~/.phpenv/bin by placing it before, so rbenv gets used from ~/.rbenv.

After that, the phpenv command should be available. The phpenv command is exactly the same as rbenv except it operates on the ~/.phpenv directory.

To install versions just drop them to the ~/.phpenv/versions directory, just like in rbenv.

For convenienve you can use php-build to do this with one command:

$ php-build 5.3.8 ~/.phpenv/versions/5.3.8


Please see the rbenv Project for documentation.


Thank you Sam Stephenson for creating the awesome rbenv!