Seperti biasa sebelumnya lakukan update dan upgrade

# apt update 
# apt upgrade

Kemudian tambahkan link paket php7 ke dalam /etc/apt/source.list

# apt install ca-certificates apt-transport-https 
# wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
# echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list

Proses install php7

# apt update
# apt install
apt install php7.2-cli php7.2-common php7.1-curlphp7.1-mbstring php7.2-mysql php7.2-xml php7.2-mysql libapache2-mod-php7.2