With this command
yum install php php-mysql php-pecl-zip php-xml php-mbstring php-gd install
php 5.4.16-X into the RHEL channel official, this version comes with the best Red Hat support.
You will install the php base distribution, with a best Red Hat support during all the life cycle of your Red Hat Entreprise Linux distribution.
Alternatively, if you have a registered RHEL7, you can use the Red Hat Software Collections Linux (RHSCL). It is a specific channel provided by Red Hat, it is different of "SCL" which is not supported by Red Hat (for CentOS by example). Mind you, these packets involve a short life cycle and an upgrade even if Red Hat gives 2 to 3 years. But the security fix is more shy than in main stream distribution RHEL7 cycle (packet php)... If you choose it, the best is to schedule upgrade all 1 year and half from your applications toward the last php rhscl version (with some king of integrations (major version php change...)
But, this collection is almost supported up to a certain point by Red Hat (by Remi for packaging too but with official red hat support (ticket, upgrade security fix and bug fix in theory (in pratical, less than main stream php packet but CVE ok but only if Red Hat wants not mandatory like main stream, you always should to go in the last RHSCL version to be certain of equivalent support with the main stream distribution packet ). These RHSCL packets comes in addition (you can be able to have several versions (one follow the standard Red Hat version and an another for example).
For RHSCL, may need to initiate a special request for it at support Red Hat.
After you should be able to use in
For RH Content Delivery Network:
subscription-manager repos --list | grep rhscl
subscription-manager repos --enable rhel-variant-rhscl-7-rpms
For RH Network:
rhn-channel --add --channel=channel_name
yum install rh-php70
or better (if your application is compatible):
yum install rh-php71
To see the other component
yum list available rh-php7X-\*
yum install pkg-name
In PHP7.X with RHSCL, you can install (don't forget the components php module if you need):
-> PHP 7.0.10 rh-php70 A release of PHP 7.0 with PEAR 1.10, enhanced language features and performance improvement.
-> PHP 7.1.8 [a] rh-php71 A release of PHP 7.1 with PEAR 1.10, APCu 5.1.8, and enhanced language features.