Tecmint published a tutorial about installing different PHP (5.6, 7.x and 8.0) versions in Ubuntu.
How to Install Different PHP (5.6, 7.0 and 7.1) Versions in Ubuntu
In this article, we will explain how to install and set different versions of PHP - PHP 5.6, 7.x and 8.0 in Ubuntu with most required PHP extensions.
How to Install Different PHP (5.6, 7.0 and 7.1) Versions in Ubuntu