Install php7.2 CentOS 6.X and 7.X

As PHP versions 5.6 and 7.0 reach End Of Life you might want to update to something newer and supported, unfortunately the official CentOS repositories don’t have PHP versions 7.1 or 7.2 yet, but with a third-party repository and a bit of fiddling it’s easy to update, and more importantly keep it updated, your server PHP version.
Just run as root:

yum update -y
yum install epel-release wget -y
yum install yum-utils -y
CENTOS_VERSION=$(rpm --eval '%{centos_ver}')
yum localinstall remi-release-${CENTOS_VERSION}.rpm -y
yum-config-manager --enable remi-php72
yum update -y
yum install php72 -y

1) This is a third-party repository you should carefully decide if you trust the owner of the repository or if you want to build it yourself, both options have merits and downsides.