ubuntu 18.04 install php 5.6 and 7.4 with modules code example
Example: change php version ubuntu
$ sudo update-alternatives --config php
or
$ sudo a2enmod php7.1(version)
$ sudo update-alternatives --config php
or
$ sudo a2enmod php7.1(version)