Lots of conflicting information out there.
What I have found so far:
# get the PPA
>sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php // LC_ALL needed for non UTF-8 locales.
>sudo apt-get update
# see which php-extensions are currently installed
>dpkg --get-selections | grep php
# Question:
# the list shown from the above command is not the same as the list of required extensions shown in
# moodle > admin > server > environment
# So, in the next command, should the list of extensions be the ones that moode needs, plus any that are already installed but which moodle is not using?
>sudo apt-get install php5.6 + extensions...
# do the upgrade
>sudo apt-get update
>sudo apt-get upgrade
# I think the following is needed only if you are migrating from old PPA to new PPA?
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php5-compat
sudo apt-get update
sudo apt-get dist-upgrade
# Tell apache2.4 to use the PHP5.6 version
>sudo apt-get install libapache2-mod-php5.6
>sudo a2dismod php5.5
>sudo a2enmod php5.6
# Restart apache2
>sudo service apache2 restart