PHP 7.0 reached end of life on 03 Dec 2018 and is no longer being updated. It's strongly recommended to upgrade to the latest version as soon as possible. You can read the official PHP migration guide here.
Update the package list:
sudo apt update
Install software-properties-common:
sudo apt install software-properties-common
Add the PHP repository:
sudo add-apt-repository ppa:ondrej/php
Update the package list again:
sudo apt update
Install PHP 7.0:
sudo apt install php7.0
Check the installed PHP version:
php -v
Verify PHP configuration:
php -i
Create a test PHP file:
echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/phpinfo.php
Access the test file in a web browser:
http://your_server_ip/phpinfo.php