subscription-manager repos --enable rhel-server-rhscl-7-eus-rpms
 yum install rh-php72 rh-php72-php rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-intl rh-php72-php-pecl-apcu 
 yum install rh-php72-php-mysqlnd 
Ref: https://docs.nextcloud.com/server/15/admin_manual/installation/php_72_installation.html