PHP 5.4 is nearing EOL and it’s the only package available for CentOS 6 without having to use additional repositories. We can upgrade php 5.6 using remi repo, you can use the following command to install remi repo and install php using the same repo.
For Centos 6
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6.rpm
For Centos 7
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm rpm -Uvh remi-release-7.rpm
Run the following command to update php to 5.6
yum --enablerepo=remi-php56,remi update php\*