There is more than one way to upgrade CentOS 6.5 to PHP 5.6; the following is a suggestion only. Consult a reference for additional options.
To upgrade to PHP 5.6:
Enter the following commands in the order shown:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
Restart Apache: service httpd restart
Enter the following command to verify that PHP 5.6 is installed:
php -v
PHP 5.6.13 (cli) (built: Sep 5 2015 07:10:08)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Set up PHP configuration options.