The CentOS default system is installed with php5.3
[Email protected] scripts]# Rpm-qa |grep php
Php-pdo-5.3.3-47.el6.x86_64
Php-mysql-5.3.3-47.el6.x86_64
Php-5.3.3-47.el6.x86_64
Php-cli-5.3.3-47.el6.x86_64
Php-common-5.3.3-47.el6.x86_64
Unloading
Rpm-e php-mysql-5.3.3-48.el6_8.x86_64
Rpm-e php-bcmath-5.3.3-48.el6_8.x86_64
Rpm-e php-5.3.3-48.el6_8.x86_64
Rpm-e php-common-5.3.3-48.el6_8.x86_64
RPM-E php-common-* #依赖包过多用yum卸载
Yum-y Remove php-common-*
Installing php5.6.25
RPM-UVH http://download.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RPM-UVH http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Yum Install--enablerepo=remi,remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd Php-phpunit-phpunit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process PHP-GD Php-common
[Email protected] scripts]# php-v
PHP 5.6.25 (CLI) (Built:aug 31 2016 19:26:19)
Copyright (c) 1997-2016 the PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
With Zend Opcache V7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
With Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
PS: sometimes appears phpinfo () print and php-v display is not a version, if it is just updated to resolve this issue need to restart the Apache service.
php5.3 Upgrade to php5.6