For openSUSE Leap 15.6 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/devel:languages:php:php74/openSUSE_Leap_15.6/devel:languages:php:php74.repo
zypper refresh
zypper install php7
For openSUSE Leap 15.5 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/devel:languages:php:php74/openSUSE_Leap_15.5/devel:languages:php:php74.repo
zypper refresh
zypper install php7
For SLE 15 SP6 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/devel:languages:php:php74/SLE_15_SP6/devel:languages:php:php74.repo
zypper refresh
zypper install php7
For SLE 15 SP5 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/devel:languages:php:php74/SLE_15_SP5/devel:languages:php:php74.repo
zypper refresh
zypper install php7
For SLE 15 SP4 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/devel:languages:php:php74/SLE_15_SP4/devel:languages:php:php74.repo
zypper refresh
zypper install php7
For SLE 15 SP3 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/devel:languages:php:php74/SLE_15_SP3/devel:languages:php:php74.repo
zypper refresh
zypper install php7