The PHP team recently announced the first testing release of PHP 8.0.0, Alpha 1. This starts the PHP 8.0 release cycle and as a Developer you can start playing with the features that PHP 8 has to offer. There will be 6 months pre-release phase before the GA release of PHP 8. This guide will show you how to install PHP 8.0 Alpha 1 on CentOS 8 | CentOS 7. Please note this release is not to be used in Production but only for testing purposes.

Below is a timetable based upon PHP 7.4 release schedule.

Date Release
Jun 25 2020 Alpha 1
Jul 09 2020 Alpha 2
Jul 23 2020 Alpha 3
Aug 04 2020 Feature freeze
Aug 06 2020 Beta 1
Aug 20 2020 Beta 2
Sep 03 2020 Beta 3
Sep 17 2020 RC 1
Oct 01 2020 RC 2
Oct 15 2020 RC 3
Oct 29 2020 RC 4
Nov 12 2020 RC 5
Nov 26 2020 GA

Reference: PHP Wiki

We’ll use REMI repository to install PHP 8 on CentOS 8 / CentOS 7 Linux system. There are two choices for the installation.

  • Install PHP 8.0 as main PHP version
  • Install PHP 8.0 alongside other PHP versions

Please DO NOT use this version in production, it is an early test version.

Install PHP 8.0 alongside other PHP versions (Recommended for Alpha releases)

As this is an early release version not to be used in Production it will make sense to run PHP 8 with other PHP versions simultaneously.

Install PHP 8.0 on CentOS 8:

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf -y install yum-utils
sudo dnf --enablerepo=remi-test install php80

Accept installation by pressing the y key in your keyboard:

....
Dependencies resolved.
========================================================================================================================================================
 Package                                        Architecture             Version                                      Repository                   Size
========================================================================================================================================================
Installing:
 php80                                          x86_64                   1.0-3.el8.remi                               remi-safe                   7.0 k
Installing dependencies:
 environment-modules                            x86_64                   4.1.4-4.el8                                  BaseOS                      254 k
 php80-php-cli                                  x86_64                   8.0.0~alpha1-20.el8.remi                     remi-safe                   3.1 M
 php80-php-common                               x86_64                   8.0.0~alpha1-20.el8.remi                     remi-safe                   682 k
 php80-runtime                                  x86_64                   1.0-3.el8.remi                               remi-safe                   1.1 M
 policycoreutils-python-utils                   noarch                   2.9-9.el8                                    BaseOS                      251 k
 scl-utils                                      x86_64                   1:2.0.2-12.el8                               AppStream                    47 k
 tcl                                            x86_64                   1:8.6.8-2.el8                                BaseOS                      1.1 M

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

Total download size: 6.5 M
Installed size: 24 M
Is this ok [y/N]: y

Install PHP 8.0 on CentOS 7:

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum --enablerepo=remi-test install php80

Use the command below to install additional PHP extensions:

$ sudo yum --enablerepo=remi-test install php80-php-xxx

Use below commands to check PHP 8 version and available extensions

$ php80 --version
PHP 8.0.0alpha1 (cli) (built: Jun 23 2020 15:59:40) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies

$ php80 --modules

Install PHP 8.0 as Default version (Only recommended for GA release)

If you prefer to install and have PHP 8.0 as the default version then use the commands below. This means replacing base packages from the distribution with ones provided by PHP 8.0.

CentOS 8:

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf -y install yum-utils
sudo dnf --enablerepo=remi-test install php php-xxx

CentOS 7:

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum --enablerepo=remi-test install php php-xxx

As you try PHP 8.0 share your feedback and issues encountered to the development team for feature improvements. Refer to the following pages.

PHP Learning course:


<img alt="The Complete Web Developer Course 2.0" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/764164_de03_2.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/icon_udemy-com.png" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>Udemy.com


<img alt="Learn Object Oriented PHP By Building a Complete Website" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/772618_cdee_5.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/icon_udemy-com.png" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>Udemy.com


<img alt="PHP for Beginners – Become a PHP Master – CMS Project" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/405282_27d2.jpg" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2020/07/echo/icon_udemy-com.png" ezimgfmt="rs rscb8 src ng ngcb8" src="data:image/svg xml,”>Udemy.com