PHP 8.2.2 is an old release of PHP 8.2 series. Using the latest version PHP 8.2.23 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.2 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.2.2
How to compile PHP
PHP can be compiled by setting up the dependencies, building the configure script (
Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.
./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.
php-8.2.2-x64NTS.zip (30.21 MiB)
php-8.2.2-x86NTS.zip (27.12 MiB)
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.
php-8.2.2-x64TS.zip (30.32 MiB)
php-8.2.2-x86TS.zip (27.10 MiB)
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.2-cli-alpine
Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.2.2-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.2-fpm-alpine
Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.2.2-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.2-fpm
ChangeLog
Core
- Fixed bug GH-10200 (zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed).
- Fix GH-10251 (Assertion `(flag & (1<<3)) == 0' failed).
- Fix GH-10240 (Assertion failure when adding more than 2**30 elements to an unpacked array).
- Fix GH-9735 (Fiber stack variables do not participate in cycle collector).
- Fix GH-9675 (Broken run_time_cache init for internal enum methods).
- Fix GH-10248 (Assertion `!(zval_get_type(&(*(property))) == 10)' failed).
FPM
- Fixed bug #77106 (Missing separator in FPM FastCGI errors).
- Fixed bug GH-9981 (FPM does not reset fastcgi.error_header).
- Fixed bug #68591 (Configuration test does not perform UID lookups).
- Fixed memory leak when running FPM config test.
- Fixed bug #67244 (Wrong owner:group for listening unix socket).
Hash
- Handle exceptions from __toString in XXH3's initialization
LDAP
- Fixed bug GH-10112 (LDAP\Connection::__construct() refers to
ldap_create()
).
Opcache
- Fix inverted bailout value in
zend_runtime_jit()
- Fix access to uninitialized variable in
accel_preload()
. - Fix
zend_jit_find_trace()
crashes. - Added missing lock for EXIT_INVALIDATE in zend_jit_trace_exit.
Phar
- Fix wrong flags check for compression method in
phar_object.c
PHPDBG
- Fix undefined behaviour in
phpdbg_load_module_or_extension()
. - Fix NULL pointer dereference in
phpdbg_create_conditional_breal()
. - Fix GH-9710: phpdbg memory leaks by option "-h"
- Fix phpdbg segmentation fault in case of malformed input
Posix
- Fix memory leak in
posix_ttyname()
Random
- Fixed bug GH-10247 (Theoretical file descriptor leak for /dev/urandom).
Standard
- Fix GH-10187 (Segfault in
stripslashes()
with arm64). - Fixed bug GH-10214 (Incomplete validation of object syntax during
unserialize()
). - Fix substr_replace with slots in repl_ht being UNDEF.
XMLWriter
- Fix missing check for xmlTextWriterEndElement
Commit List
Alex Dowad
- Allow 'h' and 'k' flags to be combined for
mb_convert_kana
in f7a19181d7 - Correct entry for 0x80,0xFD-FF in SJIS multi-byte character length table in d104481af8
- Use different mblen_table for different SJIS variants in 3152b7b26f
Arnaud Le Blanc
- GC fiber unfinished executions in GH-9810
- Reduce HT_MAX_SIZE to account for the max load factor of 0.5 in GH-10242
- Fix
run-tests.php
hanging when a worker process dies without notice in GH-9931 - Handle non-INDIRECT symbol table entries in
zend_fiber_object_gc()
in GH-10386
Ben Ramsey
- Update NEWS in 275bf3beae
Bob Weinand
- Add regression test for e560592a in a6a20c9e17
Christoph M. Becker
- Fix GH-10112: LDAP\Connection::__construct() refers to
ldap_create()
in b8ac2071b8 - Fix #81740:
PDO::quote()
may return unquoted string in 921b6813da - Skip newly added test on 32bit platforms in cf5dac07d2
- Force extension loading for new test in da5cbca23e
- Fix recently introduced
gh10251.phpt
in 6faeb9571d - Adapt
ext/intl
tests for ICU 72.1 in a9e7b90cc2
Derick Rethans
- Fix GH-9891: DateTime modify with unixtimestamp (@) must work like setTimestamp in d19a70c9a0
- Fix GH-10072: PHP crashes when execute_ex is overridden and a __call trampoline is used from internal code in 233ffccc35
- Make sure to disable JIT when overriding execute_ex in b489e0f2b8
- Fixed GH-10218: DateTimeZone fails to parse time zones that contain the "+" character in d12ba111e0
Dmitry Stogov
- Fix memory leak in 683285165e
- Fix memory leak because of incorrect optimization in 0464524292
- Fix incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values) in 4d4a53beee
- Revert "Merge branch 'PHP-8.0' into PHP-8.1" in 0d011e4626
- Fix GH-10271: Incorrect arithmetic calculations when using JIT in 42eed7bb4e
Gabriel Caruso
- Revert "Make build work with newer OpenSSL" in 255e08ac56
George Peter Banyard
- Add secondary test that registers a trampoline as a shutdown function in 44add3c791
- Fix memory leak in
posix_ttyname()
in c2b0be5570 - Add missing EXTENSIONS section to test file gh10200 in de633c31dd
Jakub Zelenka
- Fix bug #77106: Missing separator in FPM FastCGI errors in 891b58d503
- Fix GH-9981: FPM does not reset fastcgi.error_header in a3891d9d1a
- Fix bug #68591: Configuration test does not perform UID lookups in 21d8980d27
- Fix ASAN reported leak in FPM config test in 1b48a5c802
- Fix bug #67244: Wrong owner:group for listening unix socket in 120aafcc42
- Fix missing comment in FPM
www.c
onf.in in 7d98e3e40c
Kévin Dunglas
- fix: indirect_return compilation warning in 55514a1119
Max Kellermann
- ext/opcache/jit/
zend_jit
: fix inverted bailout value inzend_runtime_jit()
in GH-10144 - ext/opcache/jit: handle
zend_jit_find_trace()
failures in b26b758952 - ext/opcache/jit/
zend_jit_trace
: add missing lock for EXIT_INVALIDATE in e217138b40 - ext/opcache/jit/
zend_jit_trace
: fix memory leak in_compile_root_trace()
in GH-10146
Máté Kocsis
- Replace another root XML element format to the "canonical" one in 60cf9fbee0
- Remove the superfluous closing parentheses from class synopsis page includes in b4df038cee
- Always include the constructor on the class manual pages in 0fc60fab72
- Backport methodsynopsis role attributes changes from master in 6aa5e58414
- Only include the default constructor for non-abstract class synopses in d832125b8e
- Better document constructors in eebf3bc0ba
- Do not display non-existent constructors in 38e138798d
- Do not list private constructors as inherited in 7b08fe9f2d
Niels Dossche
- Initialize ping_auto_globals_mask to prevent undefined behaviour in c4487b7a12
- Add a regression test for auto_globals_jit=0 with preloading on in bbad29b9c1
- Fix undefined behaviour in phpdbg_load_module_or_extension in 5f1311a92c
- Update test for changed behaviour of GMP constructor in a24659e70c
- Fix null pointer dereference of param in 3a44c78f14
- Fix GH-10187: Segfault in
stripslashes()
with arm64 in 4c9375e504 - Fix GH-10200: zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed in c2404915e0
- Fix GH-10202: posix_getgr(gid|nam)_basic.phpt fail in d5f0362e59
- Move test for GH-10200 to the simplexml extension test directory in df96346f9c
- Fix GH-9710: phpdbg memory leaks by option "-h" in 8ff2b6abb2
- Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed in d03025bf59
- Fix GH-10249: Assertion `size >= page_size + 1 * page_size' failed in 833b45ac44
- Fix substr_replace with slots in repl_ht being UNDEF in 4bbbe6d652
- Fix missing check for xmlTextWriterEndElement in 11a1feb0d7
- Fix wrong flags check for compression method in
phar_object.c
in 347b7c3628 - Fix incorrect comparison in block optimization pass in dfe9c2af19
- Fix phpdbg segmentation fault in case of malformed input in 398a10a58a
- Handle exceptions from __toString in XXH3's initialization in 7463e70b1e
Petar Obradović
- Fix GH-9675: Re-adjust run_time_cache init for internal enum methods in e560592a61
Remi Collet
- Fix GH-10133 set variables_order en ensure $ENV is set in bfa56cf62b
Sergey Panteleev
- Update versions for PHP 8.2.2 in b20c0e925f
Stanislav Malyshev
- Make build work with newer OpenSSL in 5f90134bb6
- Improve fix for bug #81740 in a6a80eefe0
- Add NEWS in 05c35137cd
Thomas Gerbet
- Use absolute paths in OPCache tests when calling
opcache_compile_file()
in 1f715f5658