CentOS Stream 8
Sponsored Link

PHP 7.3 : Install
2021/03/15
 
Install PHP 7.3.
[1] Confirm the current enabled version of PHP and Install it.
[root@dlp ~]#
dnf module list php

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

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

# if other versions are enabled, reset once and switch to the version

[root@dlp ~]#
dnf module reset php

[root@dlp ~]#
dnf module enable php:7.3
# specify PHP 7.3 and install

[root@dlp ~]#
dnf module -y install php:7.3/common

Dependencies resolved.
================================================================================
 Package       Arch    Version                                 Repository  Size
================================================================================
Upgrading:
 php-cli       x86_64  7.3.20-1.module_el8.2.0+498+4deef2f1    appstream  3.0 M
 php-common    x86_64  7.3.20-1.module_el8.2.0+498+4deef2f1    appstream  669 k
 php-fpm       x86_64  7.3.20-1.module_el8.2.0+498+4deef2f1    appstream  1.6 M
 php-json      x86_64  7.3.20-1.module_el8.2.0+498+4deef2f1    appstream   73 k
 php-mbstring  x86_64  7.3.20-1.module_el8.2.0+498+4deef2f1    appstream  618 k
 php-xml       x86_64  7.3.20-1.module_el8.2.0+498+4deef2f1    appstream  187 k

Transaction Summary
================================================================================
Upgrade  6 Packages
.....
.....

[root@dlp ~]#
php -v

PHP 7.3.20 (cli) (built: Jul  7 2020 07:53:49) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.20, Copyright (c) 1998-2018 Zend Technologies

# verify to create test script

[root@dlp ~]#
echo "<?php echo 'PHP 7.3 Test Page'.\"\n\"; ?>" > php_test.php

[root@dlp ~]#
php php_test.php

PHP 7.3 Test Page
Matched Content