Mate, works on Ubuntu 18x Yes! The point is to install beyond php 7 php 5.6 as well. It's okay to have both together. Then you can set php to work.
for Change
for 5x
# For php in web apps
sudo a2dismod php5.6 && sudo a2enmod php7.0 && sudo service apache2 restart
# For php-cli in the command line
sudo ln -sfn /usr/bin/php7.0 / etc / alternatives / php
for 7x
# For php in web apps
sudo a2dismod php7.0 && sudo a2enmod php5.6 && sudo service apache2 restart
# For php-cli in the command line
sudo ln -sfn /usr/bin/php5.6 / etc / alternatives / php
php -v
see version current run
Mysql details also ...
->
xavi @ computer # sudo su
root @ computer # add-apt-repository ppa: ondrej / php
root @ computer # apt-get update
root @ computer # apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 php5.6-curl php5 .6-gd php5.6-mcrypt php5.6-xml php5.6-xmlrpc