Install PHP 7.2 on Ubuntu

To install PHP 7.2, first add repository with command

Now run apt update

Install PHP 7.2 with command

To install additional modules, run

php