1) Check the existing php version.

# php -v

 

2) Remove existing php.

# yum remove php-*
# yum remove php-common mod_php php-cli

 

3) Upgrade the php installation package

# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# yum --enablerepo=remi update remi-release

 

4) Install php and related packages

# yum install php70w

# yum install php70w-cli php70w-common php70w-dba php70w-devel php70w-fpm php70w-gd php70w-imap -y
# yum install php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysqlnd php70w-odbc php70w-opcache -y
# yum install php70w-pdo php70w-pdo_dblib php70w-pear php70w-pecl-imagick php70w-pecl-imagick-devel -y 
# yum install php70w-pgsql php70w-phpdbg php70w-process php70w-snmp php70w-soap php70w-tidy php70w-xml php70w-xmlrpc -yHTML 

 

5) Check the current php version.

# php -v