Install PHP as per Add apt signing keys to debian, the right way.
PHP is not kept up to date on distros but it can be done by using the "Sury" repo.
NB: If running Devuan, you're going to need to install a work-around package to get rid of the need for a full systemd install due to the dependency added by the sury site author to need the systemd-tmpfiles package which is used to delete temporary files. Really.
apt-get install systemd-standalone-tmpfiles