I like rvm (ruby version manager), it allows you to quickly switch between Ruby versions on the command line, for example:
$ rvm use 1.9.3
Is there a similar tool for PHP? (Preferably on the command line.) I am currently developing a PHP framework, so I need to quickly check the code on a different version of PHP.
I am using Ubuntu 11.10.
PHP, , , . script, ( PHP , , / Apache, Apache).
php , script ,
#!/usr/bin/php-4
#!/usr/bin/php-5
..
phpenv rbenv PHP:
$ phpenv global 5.3.11
php-build, PHP.
php7.1 php5.6
7.1,
sudo a2dismod php7.1
php5.6
sudo a2enmod php5.6
restart the server and now you are ready to go with php5.6
sudo service apache2 restart
the same can be done to switch another php version.