PHP 8.2.0beta2: Downloads, Changelog, News

Release Information

PHP Version
PHP 8.2
Release Date
Release Type
Bug Fix Release
Release Status
Use PHP 8.2.21 instead
Branch Status

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


Source Code

Git Clone
Use Git to clone the 8.2.0beta2 tag from the PHP Git repository.
git clone --depth 1 --branch php-8.2.0beta2
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.2.0beta2-cli-alpine

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

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

Commit List

Adam Saponara

Alex Dowad

  • New implementation of mb_convert_kana in 9ac49c0dd3
  • Fix legacy conversion filter for ISO-2022-JP-KDDI in d8a61cef4f
  • Fix legacy conversion filter for SJIS-2004 in 8a915ed26c
  • Fix legacy conversion filter for ISO-2022-KR in 6d525a425e
  • Move implementation of mb_strlen to mbstring.c in 94fde1566f
  • New implementation of mb_strimwidth in 7299096095
  • Fix legacy text conversion filter for CP50220 in 44b4fb2c36
  • Fix legacy text conversion filter for UCS-4 in 0a6ea5bd4e
  • Fix legacy text conversion filter for UTF7-IMAP in 219fff376b
  • Fix legacy text conversion filter for UTF-16 in e1351eb0a6
  • Move kana conversion function to mbfilter_cp5022x.c in 78ee18413f
  • mb_strimwidth inserts error markers in invalid input string (for backwards compatibility) in 5370f344d2

Andreas Braun

  • Escape \U and \u in generated stubs in 3c016467c7

Anton Smirnov

  • PcgOneseq128XslRr64::jump(): Throw ValueError for negative $advance in GH-9213

Arnaud Le Blanc

  • Extended map_ptr before copying class table in GH-9188
  • Extended map_ptr before copying class table in GH-9188

Ayesh Karunaratne

  • phpinfo HTML Output: Make module title names clickable and link to the URL fragment in 5c2c688c17
  • [run-tests.php] Improve non-optimal nested if/elseif/else blocks with happy path optimizations in 51447fb47d
  • [run-tests.php] Minor optimizations in if blocks by placing simple expressions first in 056afc8daf
  • [run-tests.php] Merge multiple unset() calls to a single call in f958701dad
  • [run-tests.php] Replace backtick operator string literals with shell_exec() calls in c83a10d8db
  • [run-tests.php] Combine multiple str_replace calls to a single strtr call in 3483a1f170

Bob Weinand

  • Avoid using a stack allocated zend_function in Closure::call, to avoid prevent crashes on bailout in b576bb901e
  • Add an API to manipulate observers at runtime in 9e2de4c2d9
  • Add opcache.preload_user=root to run-tests.php if root in 1c9a49e3f1
  • Fix memory_leak in zend_test in ac31e2e611
  • Include internal functions in the observer API in 625f164963
  • Fix observer test in 50a3fa49b6
  • Fix ZEND_RC_DEBUG build in zend_test observer tests in b3b21ed558

Christoph M. Becker

  • Fix --CGI-- support of run-tests.php in d430652935
  • Fix GH-9008: mb_detect_encoding(): wrong results with null $encodings in c2bdaa48e1
  • Fix GH-9067: random extension is not thread safe in 8487d8fa91
  • Fix GH-9033: Loading blacklist file can fail due to negative length in 35fd97c3c9
  • Initialize blacklist_path_length in 7d36703a8f
  • Restrict range of buffer_length on all platforms to INT_MAX in e52946eb52
  • Fix #69181: READ_CSV|DROP_NEW_LINE drops newlines within fields in 5d52d472ef
  • Tweak openssl_random_pseudo_bytes() upper bound error message in 5d62cfbc7d
  • Fix GH-9155: dba_open("non-existing", "c-", "flatfile") segfaults in a442e29485
  • Fix GH-9032: SQLite3 authorizer crashes on NULL values in 8ed21a89f3
  • Drop Windows specific implementation of openssl_random_pseudo_bytes() in 60cc37630f


  • opcache find best candidate near .text segment for large maps on FreeBSD in 1977ef92de
  • crc32 Aarch64 add crc feature to crc32_aarch64 from clang in 77bd39a116
  • GH-9157: opcache fix build on older macOs releases in 099b16800c

David Carlier

  • Sockets disable zerocopy test on ppc based arch in 067a3022f8
  • zend defines attribute malloc for Win32 as returned pointer are not aliased in 53ae24e435
  • sockets ext for solaris update in 9090e2602e
  • phpdbg few fixes, mostly printf-like format issues due to C str -> zend_string mismatches. annotate the allocator wrapper in 449edd815b

Derick Rethans


  • Port win32/codepage.c codes for windows arm64 in 02881a76a8

Dmitry Stogov

  • Fix memory leak in 44b86aee31
  • JIT: Fix missing type stote in e70d282077
  • Fix type inference in d50875c822
  • Fix SSA reconstruction when body of "foreach" loop is removed in af1a7b7b72
  • Fix incorrect guard motion out of the loop in 69c10aed58
  • Tracing: Prevent recording types of variables used to pass zend_class_entry in 2758ff2a77

George Peter Banyard

  • Fix memory leak in LMDB driver in 5b83b3a933
  • Update NEWS in 6cdfaf97e0
  • Update NEWS in f60f6be66b
  • Remove unnecessary include in SPL in 11c424c9fb
  • Convert client->request.request_uri to zend_string in GH-9086
  • [run-tests.php] echo call performance optimization in 0490f082e9
  • Add support for stubs to declare intersection type class properties in GH-8751
  • Add comment in GDBM informing to what param the 0 org corresponds to in c8ba00f627
  • Remove personalisation from write on readonly db DBA error message in 0887a1d7ab
  • Pass MDB_RDONLY to the LMDB environment for readonly DBs in 79d831ff9f
  • Add support to pass driver flags to DBA handlers in 3c372901bd
  • Ammend DBA error message to use standard messaging in 04f6fe4b25
  • The hashvalue/index of a bucket is a zend_ulong in bdf5a4e478
  • Use uint32_t in Z_PARAM_VARIADIC_WITH_NAMED in 9115211ebf
  • Improve DBA test suite in GH-8904
  • Refactor code handling file.current_zval in GH-8934
  • Change fetch_type from int to uint32_t in GH-9152
  • SPL: Use new improved is_line_empty() function instead of the old one in GH-9217

Go Kudo

  • Avoid signed integer overflow in php_random_range() in GH-9066
  • Fix memory leak on Randomizer::__construct() call twice in GH-9091

Ilija Tovilo

  • Fix rc info of iterator_to_array in GH-9080
  • Fix RC debug of stub attribute in GH-9082
  • Re-add MSAN in nightly in ad136e6a6d
  • Assert all test files are cleaned up in CI in GH-8977
  • Fix spl test cleanup in 3962f00b01
  • Fix property fetch on magic constants in constant expressions in 966d22b1bd
  • Close stale feature requests in fdb9e3a982
  • Fix attribute target validation on fake closures in 565a416e87
  • Fix arrow function with never return type in f957e3e7f1
  • Fix stale message in close-stale-feature-requests.yml in 7804cffe04
  • Hide skipped tests in CI in GH-9163

Jakub Zelenka

  • Fix #65069: GlobIterator incorrect handling of open_basedir check in 1a9e6895f1


  • Fix get/set priority - error handling for MacOS and extra tests in 520bb2ec6c

Martin Schröder

  • Fix memory leak in fiber constructor by throwing an error in GH-9098

Michael Voříšek

  • Fix typo in lob_prefetch_ini.phpt test in GH-9099
  • Use -1 "precision" in gen_stub.php in b0c0a2cfb4
  • Skip locale tests /w musl libc in GH-9141

Máté Kocsis

  • Declare ext/odbc constants in stubs in GH-9045
  • Declare ext/openssl constants in stubs in GH-9046
  • Declare ext/pcre constants in stubs in GH-9077
  • Declare ext/pdo constants in stubs in GH-9078
  • Declare ext/pspell constants in stubs in GH-9096
  • Declare ext/posix constants in stubs in GH-9095
  • Declare ext/phar constants in stubs in GH-9094
  • Declare ext/random constants in stubs in GH-9109
  • Declare ext/session constants in stubs in GH-9112
  • Declare ext/readline constants in stubs in GH-9110
  • Declare ext/reflection constants in stubs in GH-9111
  • Declare ext/sysvmsg constants in stubs in GH-9125
  • Declare ext/soap constants in stubs in GH-9124
  • Declare ext/zend_test constants in stubs in GH-9135
  • Declare ext/xml constants in stubs in GH-9131
  • Declare ext/xsl constants in stubs in GH-9134
  • Declare ext/xmlreader constants in stubs in GH-9133
  • Declare ext/snmp constants in stubs in GH-9113
  • Declare ext/zlib constants in stubs in GH-9147
  • Declare ext/pgsql constants in stubs in GH-9092
  • Do not add inherited interface methods to the class synopsis page in b56492be9c
  • Declare ext/sqlite3 constants in stubs in GH-9181
  • Declare the TestInterface::DUMMY constant in stub in 668dbaf6ab
  • Declare ext/gd constants in stubs in GH-9180
  • Fix GH-9183 Get rid of unnecessary PHPDoc param and return type checks in GH-9203
  • Declare ext/intl constants in stubs - part 1 in GH-9205
  • Declare ext/pcntl constants in stubs in GH-9075
  • Declare ext/tokenizer constants in stubs in GH-9148
  • Declare ext/sodium constants in stubs in GH-9225

Nicolas Grekas

  • Declare Transliterator::$id as readonly to unlock subclassing it in dd9f47758e

Nikita Popov

  • Fix parentheses warnings in ba9debb544
  • Fix unused-but-set-variable warnings in timelib in 40af94a24c
  • Fix unused-but-set-variable warning in hebrev() in 6ff662b2e6
  • Avoid K&R style function declarations in sha1() in 04f5da4b77
  • Suppress unused-but-set-variable warning in parsers in 107ad28350
  • Update libmysqlclient version used in CI in fc394b476b
  • Fix unserialize dictionary generation in 828c93bedc

Sergey Panteleev

Tim Düsterhus

  • Add scripts/dev/credits to 'verify-generated-files' action in GH-9049
  • Fix segmentation fault in Randomizer::getBytes() if a user engine throws in GH-9055
  • Fix byte expansion in rand_rangeXX() in GH-9056
  • Fix shift in rand_rangeXX() in GH-9088
  • Remove dead code in ext/random/random.c in GH-9114
  • Improve error reporting in random extension in GH-9071
  • Remove ->last_unsafe from php_random_status in GH-9132
  • Use ValueError if an invalid mode is passed to Mt19937 in GH-9159
  • Improve error messages in php_random_bytes() in GH-9169
  • Improve phrasing in argument value errors in ext/random in GH-9206
  • Unify ext/random unserialize errors with ext/date in GH-9185


  • random: split Randomizer::getInt() without argument to Randomizer::nextInt() in 4e92c74654
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.