#
yum install epel-release
# install Remi repo
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-6.rpm
# centos 7 rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# check installed version
yum list installed php*
# remove old version
yum remove php*
# install new version
yum install --enablerepo=remi-php72 php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
# check php version
php -v