This document discusses the key changes and limitations of PHP 8 in EasyApache 4. PHP 8.0 is the most recent major version released by php.net. It provides a number of updates and improvements over previous versions of PHP.
PHP 8.0 is only available for systems that run CentOS 7 or newer.
For a complete list of changes, including the new features and any breaking changes, read PHP’s Upgrade Notes.
Benefits of PHP 8
PHP 8 includes the addition of the following features:
- Support for Union types — Union types allow you to assign multiple types to a parameter, property, or return.
- The Just in Time (JIT) compiler — The JIT compiler will compile parts of your code an runtime, in order to improve the response time of your web pages.
- Named arguments — Named arguments allow you to assign a name to input data and call that in your code, rather than the the order of the argument.
- Attributes — Attributes act as an annotation in your PHP code, which allows you to add meta data.
Currently unavailable in PHP 8
The following extensions and modules are not currently available for PHP 8:
Incompatible with PHP 8
The following software currently does not work with PHP 8. This list is not comprehensive.
- DSO — cPanel & WHM does not support the DSO handler with PHP 8.
- The XMLRPC extensions — This extension moved to PECL.
- The JSON extension — This functionality is included in PHP 8 by default.