CentOS 8
Sponsored Link

PHP 7.2 : Install2019/10/18

 
Install PHP 7.2.
[1] Make sure the current enabled version of PHP and Install it.
[root@dlp ~]#
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@dlp ~]#
dnf module -y 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@dlp ~]#
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@dlp ~]#
echo "<?php echo 'PHP 7.2 Test Page'.\"\n\"; ?>" > php_test.php

[root@dlp ~]#
php php_test.php

PHP 7.2 Test Page
Matched Content