Switch PHP version on Ubuntu Server

Here is an example tho to switch from php5.6 to php7.1 just run the following command: