CentOS 8
Sponsored Link

PHP 7.2 : Install
2019/10/18
 
Install PHP 7.2.
[1] Make sure current enabled version of PHP and Install it.
[root@www ~]#
dnf module list php

CentOS-8 - AppStream
Name      Stream       Profiles                       Summary
php       7.2 [d]      common [d], devel, minimal     PHP scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

# install PHP 7.2

[root@www ~]#
dnf module install php:7.2

Dependencies resolved.
================================================================================
 Package          Arch   Version                                Repository
                                                                           Size
================================================================================
Installing group/module packages:
 php-cli          x86_64 7.2.11-1.module_el8.0.0+56+d1ca79aa    AppStream 3.1 M
 php-common       x86_64 7.2.11-1.module_el8.0.0+56+d1ca79aa    AppStream 653 k
 php-fpm          x86_64 7.2.11-1.module_el8.0.0+56+d1ca79aa    AppStream 1.6 M
 php-json         x86_64 7.2.11-1.module_el8.0.0+56+d1ca79aa    AppStream  73 k
 php-mbstring     x86_64 7.2.11-1.module_el8.0.0+56+d1ca79aa    AppStream 580 k
 php-xml          x86_64 7.2.11-1.module_el8.0.0+56+d1ca79aa    AppStream 188 k
Installing dependencies:
 nginx-filesystem noarch 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream  24 k
 libxslt          x86_64 1.1.32-3.el8                           BaseOS    249 k
Installing module profiles:
 php/common
Enabling module streams:
 nginx                   1.14
 php                     7.2

Transaction Summary
================================================================================
Install  8 Packages
.....
.....

[root@www ~]#
php -v

PHP 7.2.11 (cli) (built: Oct  9 2018 15:09:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

# verify to create test script

[root@www ~]#
echo "<?php echo 'PHP 7.2 Test Page'.\"\n\"; ?>" > hello.php

[root@www ~]#
php hello.php

PHP 7.2 Test Page
Matched Content