The default PHP version on CentOS is indeed PHP 5.4… however, if there’s additional PHP versions installed, you can call them if you know the correct path.
To see the path of all the PHP versions installed, you can go into System Settings -> Re-Check Config, and it’ll show you the path of all the PHP versions it detects.
I have done that now, and it has detected the new ones I’ve added.
The following PHP versions are available : 5.4.16 (/bin/php-cgi), 5.6.25 (/opt/rh/rh-php56/root/usr/bin/php-cgi), 7.0.27 (/opt/rh/rh-php70/root/usr/bin/php-cgi), 7.1.8 (/opt/rh/rh-php71/root/usr/bin/php-cgi), 7.2.10 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 5.4 (mod_php)
No PHP-FPM packages were found on this system.
PHP versions have changed to 5, 5.4, 5.6, 7.0, 7.1, 7.2 since last check. Regenerating any missing php.ini files
The output there shows you the paths for all the additional PHP versions you have installed… so you can use those paths to get your desired PHP rather than using the default “php”, which is only PHP 5.4.
So - apparently this is CentOS and you installed the updated PHP versions as recommended from one of the SCL-styled repos, so just type
scl enable php72 bash
and your path will be set to use the proper PHP executable. Better, put this in your shell initialization and it'll get set automatically. Or just change your path to include the proper path to PHP in your shell initializations before the /usr/bin .