PHP in AL2023 - Amazon Linux 2023

PHP in AL2023

AL2023 currently provides two versions of the PHP programming language, each supported for same period of time as upstream PHP. For more information, see Package support statements.

With AL2023, you can use the new features of PHP 8.2, while still supporting applications that require PHP 8.1.

Migrating from older PHP versions

The upstream PHP community put together comprehensive migration documentation for moving to PHP 8.2 from PHP 8.1. There is also documentation for migrating from PHP 8.0 to 8.1.

AL2 includes PHP 8.0, 8.1, and 8.2 in amazon-linux-extras enabling an easy upgrade path to AL2023.

Migrating from PHP 7.x versions

Note

The PHP project maintains a list and schedule of supported versions, as well as a list of unsupported branches.

When AL2023 was released, all 7.x and 5.x versions of PHP were unsupported by the PHP community, and were not included as options in AL2023.

The upstream PHP community put together comprehensive migration documentation for moving to PHP 8.0 from PHP 7.4. Combined with the documentation referenced in the previous section on migrating to PHP 8.1 and PHP 8.2, you can migrate your PHP based application to modern PHP.

Note

AL2 includes PHP 7.1, 7.2, 7.3, and 7.4 in amazon-linux-extras. It is important to note that all of these Extras are end-of-life and are not guaranteed to get any further security updates.

PHP modules in AL2023

AL2023 includes many PHP modules that are included in PHP Core. AL2023 does not aim to include all of the packages in the PHP Extension Community Library (PECL).