PHP 8
Last modified: August 30, 2024
Overview
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.
Note:
PHP 8 is only available on servers that run the CentOS 7, Ubuntu®, AlmaLinux OS, 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 adds 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 at 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 order of the argument.
- Attributes — Attributes act as an annotation in your PHP code, which allows you to add metadata.
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.