This script allow you to quickly change the version of PHP running on the system.
- You need to have installed at least two versions of
php
-
Download and unzip in any folder (for example, in
/home/YOUR_NAME/bin/
) -
Open a terminal emulator and go to the folder where you extracted the script
-
When you're in the same folder that contains the script, type the following code:
sudo chmod +x change-php-version.sh
-
Type the following code:
sudo ./change-php-version.sh PHP_VERSION
where PHP_VERSION
is the version of PHP that you want to enable. The script will automatically disable the current version before of enabling the new one.
Suppose you want to enable the version 5.6
of PHP; you have to type in terminal
sudo ./change-php-version.sh 5.6
Enjoy!