I needed to upgrade PHP from version 5.6.38 to version 7.3 by the recommendation from WordPress, so tried to find the way can do that on my CentOS 7.5 server.
Below is the current version I checked on my CentOS 7.5 server:
$ php -ver PHP 5.6.38 (cli) (built: Oct 24 2018 12:50:38) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Followings are the steps I found
STEP 1.Turn on EPEL repo, enter:
sudo yum -y install epel-release
STEP 2. Turn on Remi repo i.e.remi-php73:
sudo yum-config-manager --enable remi-php73
STEP 3. Refresh repository:
sudo yum update
STEP 4. Install php version 7.2, run:
sudo yum install php