PHP 8.1.5: 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.5 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.5 tag from the PHP Git repository.
git clone --depth 1 --branch php-8.1.5
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.5-cli-alpine

Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.1.5-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.5-fpm-alpine

Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.1.5-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.5-fpm



  • Fixed bug GH-8176 (Enum values in property initializers leak).
  • Fixed freeing of internal attribute arguments.
  • Fixed bug GH-8070 (memory leak of internal function attribute hash).
  • Fixed bug GH-8160 (ZTS support on Alpine is broken).


  • Fixed signedness confusion in php_filter_validate_domain().


  • Fixed bug GH-8115 (Can't catch arg type deprecation when instantiating Intl classes).
  • Fixed bug GH-8142 (Compilation error on cygwin).
  • Fixed bug GH-7734 (Fix IntlPartsIterator key off-by-one error and first key).


  • Fixed bug GH-8208 (mb_encode_mimeheader: $indent functionality broken).


  • Fixed bug GH-8068 (mysqli_fetch_object creates inaccessible properties).


  • Fixed bug GH-8142 (Compilation error on cygwin).


  • Fixed result_type related stack corruption on LLP64 architectures.
  • Fixed bug GH-8253 (pg_insert() fails for references).


  • Fixed Solaris builds.
  • Fix undefined behavior in php_set_inet6_addr.


  • Fixed bug GH-8121 (SplFileObject - seek and key with csv file inconsistent).
  • Fixed bug GH-8192 (Cannot override DirectoryIterator::current() without return typehint in 8.1).


  • Fixed bug GH-8048 (Force macOS to use statfs).

Commit List

Bob Weinand

Christoph M. Becker

  • Fix GH-8121: SplFileObject - seek and key with csv file inconsistent in 1d9a1f9be3
  • Fix GH-8068: mysqli_fetch_object creates inaccessible properties in ef29ddcc27
  • Fix typo (--EXTENSION-- → --EXTENSIONS--) in b92ae85b25
  • Fix GH-8208: mb_encode_mimeheader: $indent functionality broken in d0417ebc93
  • Fix signedness confusion in php_filter_validate_domain() in 771dbdb319
  • Fix result_type related stack corruption on LLP64 architectures in 5a8622fe78
  • Fix GH-8253: pg_insert() fails for references in 0e6d6f83cc

David Carlier

Dmitry Stogov

Ilija Tovilo

  • Allowing catching arg type deprecations in intl classes in 925a30979c
  • Fix IntlPartsIterator key off-by-one error in e706d024b2
  • Register JSON_ERROR_NON_BACKED_ENUM constant in GH-8285

Kamil Tekiela

  • Fix regression from #8058 in 06e383b2f4
  • Fix mnd_malloc -> mnd_emalloc from previous merge in ced5581eca

Michael Voříšek

Nikita Popov

  • Make DirectoryIterator current() / key() return types tentative in d0a0518798

Patrick Allaert

Remi Collet

  • run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n] in 23cce68d24
  • typo in fe4aba6588


Stanislav Malyshev

  • Don't try to access memory outside string in 2119ba215a

Tim Düsterhus

  • Fix memory leak of function attribute hash table in GH-8070
  • Add tests for function parameter attributes to ext/zend_test in 070012d62a
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.