PHP 8.2.12: Downloads, Changelog, News

Release Information

Release
8.2.12
PHP Version
PHP 8.2
Release Date
Release Type
Bug Fix Release
Release Status
Use PHP 8.2.24 instead
Branch Status
Supported

PHP 8.2.12 is an old release of PHP 8.2 series. Using the latest version PHP 8.2.24 is highly recommended.
PHP 8.2 continues to receive bug fixes and security fixes until 2024-12-31.

Downloads

Source Code

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

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

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

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

ChangeLog

Core

  • Fixed bug GH-12207 (memory leak when class using trait with doc block).
  • Fixed bug GH-12215 (Module entry being overwritten causes type errors in ext/dom).
  • Fixed bug GH-12273 (__builtin_cpu_init check).
  • Fixed bug #80092 (ZTS + preload = segfault on shutdown).

CLI

  • Ensure a single Date header is present.

CType

  • Fixed bug GH-11997 (ctype_alnum 5 times slower in PHP 8.1 or greater).

DOM

  • Restore old namespace reconciliation behaviour.
  • Fixed bug GH-8996 (DOMNode serialization on PHP ^8.1).

Fileinfo

  • Fixed bug GH-11891 (fileinfo returns text/xml for some svg files).

Filter

  • Fix explicit FILTER_REQUIRE_SCALAR with FILTER_CALLBACK

Hash

  • Fixed bug GH-12186 (segfault copying/cloning a finalized HashContext).

Intl

  • Fixed bug GH-12243 (segfault on IntlDateFormatter::construct).
  • Fixed bug GH-12282 (IntlDateFormatter::construct should throw an exception on an invalid locale).

MySQLnd

  • Fixed bug GH-12297 (PHP Startup: Invalid library (maybe not a PHP library) 'mysqlnd.so' in Unknown on line).

Opcache

  • Fixed opcache_invalidate() on deleted file.
  • Fixed bug GH-12380 (JIT+private array property access inside closure accesses private property in child class).

PCRE

  • Fixed bug GH-11956 (Backport upstream fix, PCRE regular expressions with JIT enabled gives different result).

SimpleXML

  • Fixed bug GH-12170 (Can't use xpath with comments in SimpleXML).
  • Fixed bug GH-12223 (Entity reference produces infinite loop in var_dump/print_r).
  • Fixed bug GH-12167 (Unable to get processing instruction contents in SimpleXML).
  • Fixed bug GH-12169 (Unable to get comment contents in SimpleXML).

Streams

  • Fixed bug GH-12190 (binding ipv4 address with both address and port at 0).

XML

  • Fix return type of stub of xml_parse_into_struct().
  • Fix memory leak when calling xml_parse_into_struct() twice.

XSL

  • Fix type error on XSLTProcessor::transformToDoc return value with SimpleXML.

Commit List

Anatol Belski

coppolafab

  • php_cli_server: ensure single date header is present in f6ac08c6a3

David Carlier

  • Fix GH-12243, segfault on IntlDateFormatter::construct with dateType set to UDAT_PATTERN but not timeType in 84c4336aa3
  • Fix GH-12282: IntlDateFormatter::construct should throw an exception is the locale field has an invalid value in a80db7b52a
  • Fix GH-12190: stream_context_create with address and port at 0 in d65c80031a

divinity76

  • support running testsuite with negative niceness in GH-11481

Dmitry Stogov

Florian Sowade

Ilija Tovilo

  • Fix filter_var with callback and explicit REQUIRE_SCALAR in c2fb10d2d2
  • Upgrade to macOS 12 in CI in 55ed7690f4
  • Fix getpriority test with negative return value in 181598d403
  • Fix SKIPIF jit test in 6e7e52de19
  • Minimal backport of 098d9ca in 36a87e6d32
  • Move Cirrus to nightly only, trigger on-demand in 92693a2286

Max Semenik

Mikhail Galanin

  • Invalidate path even if the file was deleted in f4ab494906

Niels Dossche

  • Fix GH-12170: Can't use xpath with comments in SimpleXML in 747335f100
  • Fix GH-12192: SimpleXML infinite loop when getName() is called within foreach in 4d888cf53f
  • Fix GH-12223: Entity reference produces infinite loop in var_dump/print_r in 39a9e561f9
  • Fix GH-12208: SimpleXML infinite loop when a cast is used inside a foreach in 486276f0f9
  • Fix GH-11956: PCRE regular expressions with JIT enabled gives different result in d61efdfe97
  • Fix bug #55098: SimpleXML iteration produces infinite loop in 1a4e401bf0
  • Fix GH-12215: Module entry being overwritten causes type errors in ext/dom (<= PHP 8.3) in da6097ffc8
  • Fix return type of stub of xml_parse_into_struct() in b1d9a8d321
  • Fix memory leak when calling xml_parse_into_struct() twice in 30f26b587a
  • Fix GH-12167 and GH-12169: Unable to get comment or processing instruction contents in SimpleXML in 82a84d0b7b
  • Fix GH-12297: PHP Startup: Invalid library (maybe not a PHP library) 'mysqlnd.so' in Unknown on line in 14fc3d1566
  • Fix GH-11997: ctype_alnum 5 times slower in PHP 8.1 or greater in 07811b6390
  • Restore old namespace reconciliation behaviour in e127f87114
  • Fix type error on XSLTProcessor::transformToDoc return value with SimpleXML in 2a7f23e9b9
  • Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT in e72fc12058
  • Revert "Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT" in 643c4ba417
  • Apply SimpleXML iterator fixes only on master in b842ea4fa8
  • Fix #80092: ZTS + preload = segfault on shutdown in bdc87b0f66
  • Fix test under older CI configurations in b140f6e9f8
  • Ignore optional warning output in test in 6cf76d552e
  • Fix Windows CI in ae52f1958d
  • Fix GH-12380: JIT+private array property access inside closure accesses private property in child class in fb6838770c
  • Fix GH-8996: DOMNode serialization on PHP ^8.1 in 24e5e4ec0d

Pierrick Charron

Thomas Hurst

Tim Düsterhus

  • Update GitHub Action workflows to actions/checkout@v4 in 45e60e585e

twosee

  • Fix socket_export_stream() with wrong protocol in b5da98b972

usarise

  • fileinfo: Backport svg detection patch in 1f5bea3452
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 💜