Switch PHP Versions on Commandline Ubuntu 16.04

How can I change php-cli version on Ubuntu 14.04?


sudo update-alternatives --set php /usr/bin/php5.6

Please see: Source

Install specific PHP version on Ubuntu 16.04 server

You will not have any issue between PHP 7.3.12 and 7.3.14.

A version is split in 3 parts, 7(for main version).3(for current minor version).12(for bugfixes).

Do not try to exec php code on two differents main version 5.0 / 7.0 because of many big changes.

Also there is no many changes in minor version but still, you can have some differents behavior.

And the last one for bugfixes, you should not worry about.
For a complete list of change you can find the changelog : https://www.php.net/ChangeLog-7.php#PHP_7_3

Bugfixes version are release all life of supported version, for exemple PHP 7.3 will have security fixes until 6 Dec 2021.
For actual list, see : https://www.php.net/supported-versions.php


For your other question, you can install another version of php with major an minor (like php 7.2 or php 7.3) in ubuntu and change the path of the php exec command.
But you can't choose (Not sure at 100%) between php 7.3.12 and 7.3.14 because it's bugfixes and it's just a update.

Unable to change php version in ubuntu 18.04

please try:

sudo apt install libapache2-mod-php7.2
sudo service apache2 restart


Related Topics



Leave a reply



Submit