sudo apt-get install apache2 libapache2-mod-php mysql-server php php-gettext php-mbstring php7.0-mbstring
sudo /etc/init.d/apache2 restart
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";
  • This are the full screenshots.

./20161008-1931-cet-installing-php-in-ubuntu-1604-1.png

./20161008-1931-cet-installing-php-in-ubuntu-1604-2.png

./20161008-1931-cet-installing-php-in-ubuntu-1604-3.png