CentOS 5533 Published by

Webtatic has released PHP 7.0.0 packages for CentOS/RHEL 6.7 and 7.1



PHP 7.0.0 has been released on PHP.net on 3rd December 2015, and is also available for CentOS/RHEL 6.7 and 7.1 at Webtatic via Yum in it’s testing repository.

PEAR installer now supports PHP 7.0.0, however most pecl libraries will not support it as well without their maintainers adding compatibility, so only pecl libraries that do support it will be in the Webtatic repository.

PHP 7.0.0 comes with new version of the Zend Engine with features such as (incomplete list):

Improved performance: PHP 7 is up to twice as fast as PHP 5.6
Consistent 64-bit support
Many fatal errors are now Exceptions
Removal of old and unsupported SAPIs and extensions
The null coalescing operator (??)
Combined comparison Operator ()
Return Type Declarations
Scalar Type Declarations
Anonymous Classes

For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes.

To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum:

CentOS/RHEL 7.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Now you can install PHP 7.0 (along with an opcode cache) by doing:

yum install php70w php70w-opcache

This will install the mod_php SAPI for PHP, however there are other sapis such as php-fpm (via php70w-fpm package). Read on below for more information about the available SAPIs

If you would like to upgrade php to this version it is recommended that you first check that your system will support the upgrade, e.g. making sure any CPanel-like software can run after the upgrade.

Unless you know what you are doing, it is risky upgrading an existing system. It’s much safer to do this by provisioning a separate server to perform the upgrade as a fresh install instead.

If you know what you are doing, you can upgrade PHP by:

yum install yum-plugin-replace

yum replace php-common --replace-with=php70w-common

It will likely give you a message “WARNING: Unable to resolve all providers …”. This is normal, and you can continue by tying “y“. You will be given a chance to see what packages will be installed and removed before again being given a chance to confirm.
  PHP 7.0.0 for CentOS 6.7 and 7.1