Last modified: June 2, 2023
This document discusses the key changes and limitations of PHP 8 in EasyApache 4. PHP 8 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 is only available on servers that run the CentOS 7 or later, Ubuntu®, AlmaLinux, or Rocky Linux™ operating systems.
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.