PHP 8.2.21: Downloads, Changelog, News

Release Information

Release
8.2.21
PHP Version
PHP 8.2
Release Date
Release Type
Security Update
Release Status
Use PHP 8.2.24 instead
Branch Status
Supported

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

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

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

ChangeLog

Core

  • Fixed bug GH-14315 (Incompatible pointer type warnings).
  • Fixed bug GH-12814 (max_execution_time reached too early on MacOS 14 when running on Apple Silicon).
  • Fixed bug GH-14387 (Crash when stack walking in destructor of yielded from values during Generator->throw()).
  • Fixed bug GH-14456 (Attempting to initialize class with private constructor calls destructor).
  • Fixed bug GH-14549 (Incompatible function pointer type for fclose).

BCMath

  • Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0).

Curl

  • Fixed bug GH-14307 (Test curl_basic_024 fails with curl 8.8.0).

DOM

  • Fixed bug GH-14343 (Memory leak in xml and dom).

FPM

  • Fixed bug GH-14037 (PHP-FPM ping.path and ping.response config vars are ignored in status pool).

GD

  • Fix parameter numbers for imagecolorset().

Intl

  • Fix reference handling in SpoofChecker.

MySQLnd

  • Partially fix bug GH-10599 (Apache crash on Windows when using a self-referencing anonymous function inside a class with an active mysqli connection).

Opcache

  • Fixed bug GH-14267 (opcache.jit=off does not allow enabling JIT at runtime).
  • Fixed TLS access in JIT on FreeBSD/amd64.
  • Fixed bug GH-11188 (Error when building TSRM in ARM64).

PDO ODBC

  • Fixed bug GH-14367 (incompatible SDWORD type with iODBC).

PHPDBG

  • Fixed bug GH-13681 (segfault on watchpoint addition failure).

Soap

  • Fixed bug #47925 (PHPClient can't decompress response).
  • Fix missing error restore code.
  • Fix memory leak if calling SoapServer::setObject() twice.
  • Fix memory leak if calling SoapServer::setClass() twice.
  • Fix reading zlib ini settings in ext-soap.
  • Fix memory leaks with string function name lookups.
  • Fixed bug #69280 (SoapClient classmap doesn't support fully qualified class name).
  • Fixed bug #76232 (SoapClient Cookie Header Semicolon).
  • Fixed memory leaks when calling SoapFault::__construct() twice.

Sodium

  • Fix memory leaks in ext/sodium on failure of some functions.

SPL

  • Fixed bug GH-14290 (Member access within null pointer in extension spl).

Standard

  • Fixed bug GH-14483 (Fixed off-by-one error in checking length of abstract namespace Unix sockets).

Streams

  • Fixed bug GH-11078 (PHP Fatal error triggers pointer being freed was not allocated and malloc: double free for ptr errors).

Commit List

Arnaud Le Blanc

  • Fix TLS access in JIT on FreeBSD/amd64 in 79862f24da

Ben Ramsey

Bob Weinand

  • Fix GH-14387: Crash when stack walking in destructor of yielded from values during Generator->throw() in be7f3aa474

Calvin Buckley

David Carlier

Derick Rethans

  • Fixed off-by-one error in checking length of abtract namespace Unix sockets in ad56ec7bbf
  • Update NEWS in c595ab96ab

Dmitry Stogov

  • Fix incorrect conditions in 48ae025c33
  • Fix undefined behavior (left shift of negative number) in 9534e0d42d
  • Fix GH-14480: Method visibility issue introduced in version 8.3.8 in GH-14484
  • Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths in GH-14558

Gina Peter Banyard

  • ext/bcmath: Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0) in 709869c8bd
  • ext/standard: Fix test conflict with I/O tests in 75f6132818
  • Fix bug GH-14456: Attempting to initialize class with private constructor calls destructor in cdb7677b38
  • ext/soap: Fix memory leaks when calling SoapFault::__construct() twice in df219ccf9d

Giovanni Giacobbi

  • Fix parameter numbers for imagecolorset() in da769be7c9

Ilija Tovilo

  • Fix enabling of JIT at runtime in 9506ca6001
  • Skip JIT test if php is compiled without jit in 04c9749e35
  • Re-add 32-bit push build in 69dbfadd1e
  • Attempt to fix mysql_native_password error for 32-bit build in a05301e783
  • Fix windows rename test directories clashing in 8d9f9755e8
  • Remove GitHub actions junit artifacts in f598b58790

Jakub Zelenka

Kévin Dunglas

  • Set SG(rfc1867_uploaded_files) to null after destroy in c47d357db5

Manuel Kress

  • Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system in 272da51bfd

nielsdos

Niels Dossche

Peter Kokot

  • Fix incompatible pointer type warnings in 9e226b2881

Ryan Carsten Schmidt

  • Fix incompatible function pointer types in b43378d830

Sergey Panteleev

Valentin Udaltsov

Wilhansen Li

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 💜