Ubuntu – Instalace PHP 5.6 a PHP 7.3
Install PHP 5.6 on Linux Mint
sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install -y php5.6
Install PHP 7.3 on Linux Mint
sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install -y php7.3
Switch Between PHP Version’s
From PHP 5.6 => PHP 7.3
Apache:
sudo a2dismod php5.6 sudo a2enmod php7.3 sudo service apache2 restart
CLI:
sudo update-alternatives --set php /usr/bin/php7.3 sudo update-alternatives --set phpize /usr/bin/phpize7.3 sudo update-alternatives --set php-config /usr/bin/php-config7.3
From PHP 7.3 => PHP 5.6
Apache:
sudo a2dismod php7.3 sudo a2enmod php5.6 sudo service apache2 restart
CLI:
sudo update-alternatives --set php /usr/bin/php5.6 sudo update-alternatives --set phpize /usr/bin/phpize5.6 sudo update-alternatives --set php-config /usr/bin/php-config5.6