PHP 8.1.24: Downloads, Changelog, News

Release Information

PHP Version
PHP 8.1
Release Date
Release Type
Bug Fix Release
Release Status
Use PHP 8.1.29 instead
Branch Status
Security-Fixes Only

PHP 8.1 is currently only receiving security fixes. PHP 8.1.24 is not the latest version in the series, and using this release is not recommended. PHP 8.1.29 is the latest in the series.


Source Code

Git Clone
Use Git to clone the 8.1.24 tag from the PHP Git repository.
git clone --depth 1 --branch php-8.1.24
How to compile PHP
PHP can be compiled by setting up the dependencies, building the configure script (./buildconf), configuring the build ./configure, and running make.
Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.

Windows binaries

Non-Thread Safe Builds
Non-Thread Safe (NTS) builds are single-threaded PHP builds. They can be used on web servers that integrate PHP over FastCGI protocol, such as Nginx, Caddy, and IIS.
Thread-Safe Builds
Thread-Safe (TS) builds are multi-thread PHP builds, often used to integrate PHP as a Server API for multithreaded servers. The most common use case is using PHP as an Apache module.

Docker/Podman Containers

PHP CLI Containers images only include the PHP CLI, and no FPM or Apache modules. The Alpine builds are lightweight, but may introduce incompatibilities due to their musl builds. Albeit their larger size, the Debian-based (without the "-alpine" suffix) images are more complete, and widely used.

Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:8.1.24-cli-alpine

Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.1.24-cli
PHP CLI + Web Server Integration
These container images include PHP CLI, and a web server integration. FPM container images can be integrated with web servers such as Nginx, Caddy, and Apache with Event MPM. The Apache container images include Apache web server, integrating PHP as an Apache module.

Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:8.1.24-fpm-alpine

Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.1.24-apache

Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.1.24-fpm



  • Fixed bug GH-11937 (Constant ASTs containing objects).
  • Fixed bug GH-11790 (On riscv64 require libatomic if actually needed).
  • Fixed bug GH-12073 (Segfault when freeing incompletely initialized closures).
  • Fixed bug GH-12060 (Internal iterator rewind handler is called twice).
  • Fixed bug GH-12102 (Incorrect compile error when using array access on TMP value in function call).


  • Fix memory leak when setting an invalid DOMDocument encoding.


  • Fixed build for NetBSD which still uses the old iconv signature.


  • Fixed bug GH-12020 (intl_get_error_message() broken after MessageFormatter::formatMessage() fails).


  • Fixed bug GH-10270 (Invalid error message when connection via SSL fails: "trying to connect via (null)").


  • Fixed memory leak with failed SQLPrepare.
  • Fixed persistent procedural ODBC connections not getting closed.


  • Fixed bug #52751 (XPath processing-instruction() function is not supported).


  • Fixed bug GH-11972 (RecursiveCallbackFilterIterator regression in 8.1.18).


  • Fixed bug GH-11878 (SQLite3 callback functions cause a memory leak with a callable array).

Commit List

Ben Ramsey

Calvin Buckley

  • Fix memory leak with failed SQLPrepare in a022ec53bd
  • Fix persistent procedural ODBC connections not getting closed in 5a2b251610
  • ODBC unit tests shouldn't override odbc.ini location in a648d39297

David Carlier

Dmitry Stogov

  • Fixed uninitialized EX(opline) access (possible Zend/tests/gh12073.phpt crash) in f1f608bf53
  • Fixed tracing JIT support for CALLABLE_CONVERT in GH-12156

George Peter Banyard

  • Fixed bug GH-12020: intl_get_error_message() broken after MessageFormatter::formatMessage() fails in a579fa807c

Ilija Tovilo

  • Fix segfault in format_default_value due to unexpected enum/object in f78d1d0d10
  • Remove redundant condition in dd01c74a6f
  • Move installation of oracle instant client in GHA in ba07a0b846
  • Fix missing instantclient in CI in f3bd027b69
  • Make unrepeatable tests retriable in f2c16b7ba3
  • Skip dl() tests on ASAN in fb0f4215de
  • Increase run-tests.php timeout for asan in f4a6a6d096
  • Fix freeing of incompletely initialized closures in af2110e664
  • Fix zend_separate_if_call_and_write for FUNC_ARGs in 748adf18fc

Jakub Zelenka

  • Fix flaky file stat tests due to changing nature of atime in e1396a314d

Jeremie Courreges-Anglas

  • On riscv64 require libatomic if actually needed in bf3fb4e5c9


Kamil Tekiela

  • Fix implicit/explicit port in mysqlnd in c1103a9772
  • Fix failing test on nightly in ffd398b4fe
  • Fix param name in implode() error message in b1ce1d1f21

Niels Dossche

  • Fix memory leak when setting an invalid DOMDocument encoding in 20ac42e1b0
  • Add missing EXTENSIONS section to DOM tests in bffc74474b
  • Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18 in 1cdcbc05b0
  • Fix GH-11878: SQLite3 callback functions cause a memory leak with a callable array in 07a9d2fb32
  • Fix #52751: XPath processing-instruction() function is not supported in 107443b311
Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.