Well, do install CentOS ... 7 or 8 - then ... your 'sandbox' will last longer! You will have more fun 'destroying and fixing' then for a longer period of time.
Sense CentOS is really RHEL without 'RH eye candy' (and cost) and LTS you'll still have simlar issues when using dnf (dandified yum) to install PHP and MySQL.
3 party repos best ... remi for PHP ... and IF going MySQL route use MySQL's own repo for DB. Google those!