Switch PHP version on Ubuntu 16

PHP 5.6

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

PHP 7.0

    sudo update-alternatives --set php /usr/bin/php7.0

Source: Stackoverflow