PHP 8.1.6: Downloads, Changelog, News

Release Information

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

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

Downloads

Source Code

Git Clone
Use Git to clone the 8.1.6 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.1.6
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
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.6-cli-alpine

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

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

ChangeLog

Core

  • Fixed bug GH-8310 (Registry settings are no longer recognized).
  • Fixed potential race condition during resource ID allocation.
  • Fixed bug GH-8133 (Preloading of constants containing arrays with enums segfaults).
  • Fixed Haiku ZTS builds.

Date

  • Fixed bug GH-7752 (DateTimeZone::getTransitions() returns insufficient data).
  • Fixed bug GH-8108 (Timezone doesn't work as intended).
  • Fixed bug #81660 (DateTimeZone::getTransitions() returns invalid data).
  • Fixed bug GH-8289 (Exceptions thrown within a yielded from iterator are not rethrown into the generator).

FFI

  • Fixed bug GH-8433 (Assigning function pointers to structs in FFI leaks).

FPM

  • Fixed bug #76003 (FPM /status reports wrong number of active processe).
  • Fixed bug #77023 (FPM cannot shutdown processes).
  • Fixed comment in kqueue remove callback log message.

Hash

  • Fixed bug #81714 (segfault when serializing finalized HashContext).

Iconv

  • Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header).

Intl

  • Fixed bug GH-8364 (msgfmt_format $values may not support references).

MBString

  • Number of error markers emitted for invalid UTF-8 text matches WHATWG specification. This is a return to the behavior of PHP 8.0 and earlier.

MySQLi

  • Fixed bug GH-8267 (MySQLi uses unsupported format specifier on Windows).

OPcache

  • Fixed bug GH-8063 (OPcache breaks autoloading after E_COMPILE_ERROR).

SPL

  • Fixed bug GH-8366 (ArrayIterator may leak when calling __construct()).
  • Fixed bug GH-8273 (SplFileObject: key() returns wrong value).

Streams

  • Fixed php://temp does not preserve file-position when switched to temporary file.

zlib

  • Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header).

Commit List

Alex Dowad

  • Error handling for UTF-8 complies with WHATWG specification in 04e59c916f

Arnaud Le Blanc

  • Clear recorded errors before executing shutdown functions in f20e11cbe1

Ben Ramsey

Bernd Holzmüller

  • Preserve file-position when php://temp switches to temporary file in 84c18f9f04

Bob Weinand

  • Fix GH-8289: Exceptions thrown within a yielded from iterator are not rethrown into the generator in 13649451c2
  • Fix deprecated warning in new gh8289.phpt test in e4c7ffc152
  • Ensure correct target opline for exceptions thrown during yield from in 9cb512ecc1
  • Fix GH-8433: Assigning function pointers to structs in FFI leaks memory in 2397e7685e
  • Add missing SKIPIF for new ext/ffi test in a74b865123

Christoph M. Becker

Cody Mann

David Carlier

  • Fix FPM zlog warning with var being uninitialized in fc9fecbd09
  • Fix FPM socket clean up reallocation clang build warning in 2f0918c638
  • Fix FPM kqueue handler fix remove callback typo in ff90d42b8b
  • Haiku fix ZTS build disabling tsrm_ls_cache usage in 4bb0dd49d8

Derick Rethans

Dmitry Stogov

  • Fix arsort() crash on recursion in 14fddd17df
  • JIT: Fixed incorrect code generation in 0d44bbd212
  • Trcing JIT: remove unchecked type guards om ROPE_* instructions in 33704be5f2
  • Fixed reference counting inference in c0bb238483
  • JIT: Fix array clobbering by user error handler in c489e360a6
  • Tracing JIT: Fixed incorrect assumption about stack slot type in 5b048dd05c
  • JIT: Fix memory lek in 3aaf2f6f89
  • JIT: Fixed incorrect guard in c3a30544ad
  • Fix type narrowing warning during type inference of ZEND_FETCH_DIM_W in 8286de2fd3
  • Fix type inference in 3e78964742
  • Reorder optimization passes to avoid miss-optimization in 3b735456c6
  • Fix ISSET_ISEMPTY_VAR missoptimization in 948ef10dd0
  • Fixed tests in 3564eaff42

Gabriel Caruso

George Peter Banyard

Ilija Tovilo

  • Re-enable i386 tests on Azure Pipelines in d82d62c237
  • Add nightly for GitHub actions in 5de1cd9e48
  • Remove issue_comment trigger on nightly in 9af3759987
  • Run nightly on php org only unless triggered via workflow_dispatch in cd90ddca85
  • Fix preloading of constants containing enums in 4397811db2
  • Only check tracked files in verify-generated-files in 1dc6dba014
  • Add missing news entry for GH-8421 in 4d6965dcec

Jakub Zelenka

Michael Voříšek

Mikko Pesari

Máté Kocsis

  • Mark ext/mysqli properties as readonly for documentation purposes in 2b4fee03af

Nikita Popov

  • Improve file/line information for narrowing warning in 323f3c6914
  • Improve type narrowing fix in c72e9621ce
  • Fix inference for assignment of known object to reference in b08aac0451
  • Don't use CE info from pi node for MAY_BE_REF var in 41f33b9dc3
  • Don't use CE for by-ref arguments in 5d072578cd
  • Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE in d16d251e20
  • Don't set ce for by-ref return type in b0ab5d0fb0
  • Don't optimize trailing args for prototype fbc in 11f950e77e
  • Move check for named params in fcall optimization earlier in 18b4e36df1

Ollie Read

  • Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method in d0f1b987a5

Patrick Allaert

ryancaicse

  • Move locks in TSRM.c to prevent races in 1a75269c8e

Tim Düsterhus

  • Fix --EXTENSIONS-- section for two tests in ext/zend_test in 5655f1abe3
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.

Support PHP.Watch — If you find the articles, version information, Codex, and other PHP.Watch contributions useful, consider supporting through GitHub Sponsors. Your sponsorship helps dedicate more time to creating valuable content and improving the PHP community. Together, we can keep the momentum going — thank you for your support!

Thanks to the highest tier sponsor: @TomasVotruba for your generous support to keep PHP.Watch moving 💜