Install PHP 7 on CentOS 6
Install EPEP repo with command
yum install -y epel-release
Next you need REMI repo, you can get it form
https://rpms.remirepo.net/
Install it with
rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-6.rpm
You can search for PHP versions with command
yum search php
Select PHP version
First install yum-utils
yum install yum-utils
Now you can select required PHP version with command
yum-config-manager --enable remi-php72
Use remi-php70 for PHP 7.0, remi-php71 for PHP 7.1
Install PHP
To install PHP 7.2, run
yum install php72 -y
PHP binary will be installed as php72, you can create a synlink if you need.
ln -s /usr/bin/php72 /usr/bin/php
Enable PHP in Apache
yum install php72-php
Now restart apache
service httpd restart