Installare versioni multiple di PHP su Ubuntu Server è relativamente semplice.
Aggiungete la seguente repository:
sudo apt-add-repository ppa:ondrej/php
Aggiornate:
sudo apt-get update
Quindi:
# PHP 5.5
sudo apt-get install php5.5
# PHP 5.6
sudo apt-get install php5.6
# PHP 7
sudo apt-get install php7.0
Per le librerie aggiuntive dovete specificare la versione di PHP nel prefisso:
sudo apt-get install php5.6-gd
sudo apt-get install php5.6-mysql
sudo apt-get install php5.6-curl
sudo apt-get install php5.6-zip
sudo apt-get install php5.6-xml