TecMint published a tutorial about enabling Remi Rrpository to install latest LAMP stack.
How to Enable Remi Repository to Install Latest LAMP Stack
In this article we will introduce Remi, a third-party repository that includes up-to-date versions of Apache, MySQL / MariaDB, PHP, and related software.