Release Information
- Release Type
- Bug Fix Release
- Release Status
- QA Release
- Branch Status
- Upcoming Release
PHP 8.6 is a development version, and is not recommended for production use. PHP 8.6 is scheduled to reach General Availability on 2026-11-19.
PHP 8.6.0RC3 is the latest QA release in PHP 8.6.
Downloads
Source Code
Git Clone
Use Git to clone the 8.6.0beta3 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.6.0beta3How 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.
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.6.0beta3-cli-alpineDebian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.6.0beta3-cliPHP 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.6.0beta3-fpm-alpineDebian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.6.0beta3-apacheDebian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.6.0beta3-fpmChangeLog
BCMath
- Fixed out-of-bounds read in
bc_is_zero_for_scale()when scale exceeds n_scale.
Core
- Fixed out-of-bounds reads during automatic UTF-16/32 encoding detection.
- Calling
is_a()oris_subclass_of()with a string as the first argument when$allow_stringis false is now deprecated. - Fixed bug GH-23232 (lone namespace separator asks the autoloader for an empty class name).
- Enabled the TAILCALL VM (--disable-gcc-global-regs) when building with GCC >= 16.
CLI
- Fixed bug GH-23242 (PHP development server does not support Expect 100-continue flow control).
Calendar
- Fixed *
tojd()functions andcal_to_jd()truncating arguments outside the int range instead of rejecting them.
DOM
- Fixed
NamedNodeMap::getNamedItemNS()with an empty URI not matching the null namespace in spec-following mode. - Fixed stale getElementsByClassName() and other node list caches after className/classList writes and attribute removals.
- Fixed reference cycles through DOMXPath and XSLTProcessor php:function callback arguments and return values not being collectable.
Hash
- Fixed
hash_file()reporting argument #1 ($algo) instead of argument #2 ($filename) when the filename contains null bytes.
Intl
- Fixed
grapheme_strpos()andgrapheme_strrpos()with an empty needle returning UTF-16 offsets instead of grapheme offsets. - Fixed a memory leak when dumping IntlCalendar instances.
- Fixed
Collator::sortWithSortKeys()allocating fixed 2MiB buffers regardless of array size. - Fixed a memory leak when iterating
IntlBreakIterator::getPartsIterator()results. - Fixed a leak in
Locale::getKeywords()when a keyword value cannot be read. - Fixed a use-after-free when IntlRuleBasedBreakIterator is constructed from compiled rules.
- Fixed Spoofchecker methods not recording the ICU error code when an ICU call fails.
- Fixed
idn_to_ascii()andidn_to_utf8()reporting argument #2 ($flags) instead of argument #3 ($variant) for an invalid IDNA variant, and the domain length error message printing a literal "d" instead of the limit.
MBString
- Fixed
mb_ereg_replace()emitting a NUL or out-of-bounds bytes in the replacement when a \k<name> backref has no closing delimiter.
ODBC
- Fixed
odbc_field_len(),odbc_field_scale()andodbc_field_type()returning uninitialized memory when SQLColAttribute fails. odbc_error()andodbc_errormsg()now also report SQLColAttribute failures.
PCNTL
- Fixed the declared signature of
pcntl_signal(), whose$restart_syscallsargument accepts null and defaults to it.
PDO_PGSQL
- Added Pdo`Pgsql::ATTR_CHUNK_SIZE` to fetch a result set in chunks of the given number of rows.
PGSQL
- Fixed the
pg_insert(),pg_update()andpg_delete()flag error messages, which did not name the set of flags actually accepted.
Phar
- Fixed bug GH-23418 (Use-after-free when looking up mounted directories).
- Fixed bug GH-23477 (Memory leak on duplicate native Phar manifest entries).
Sockets
- Fixed
socket_set_option()withSO_ATTACH_REUSEPORT_CBPFand a zero value, which detached the classic BPF filter instead of the reuseport program.
SOAP
- Fixed WSDL cache corruption when a soap:header defines headerfaults.
- Fixed stack overflow when parsing a WSDL with self-referential schema groups or attributeGroups.
Sodium
- Added support for the libsodium 1.0.22 KEM APIs (X-Wing and ML-KEM768).
Standard
- Fixed a segfault when a stream filter callback unsets StreamBucket::$data before re-attaching the bucket.
- Fixed an out-of-bounds read when following a redirect response with an empty Location header.
- Fixed read buffer compaction in
php_stream_filter_flush(). Io\Poll\Context::wait()now rejects a $maxEvents value greater than INT_MAX instead of truncating it.- Fixed GH-23338 (fsockopen()/
pfsockopen()ValueError reported wrong argument number for $timeout). - Fixed bug GH-23576 (Next index for array returned from
array_keys()is wrong).
SimpleXML
- Fixed writing to a dimension of the object returned by
attributes()not creating the attribute. - Fixed child elements of the element returned by
SimpleXMLElement::addChild()not being accessible by property name when namespaces are involved.
Streams
- Added so_rcvbuf and so_sndbuf stream socket context options, setting the socket receive and send buffer sizes in bytes.
Commit List
Arnaud Le Blanc
- Fix double free of phpdbg watch element chains in 9d6fd4fd98
- PFA: Fix UAF of inherited attribute argument value in GH-23258
- Fix
zend_jit_trace_find_init_fcall_op()in GH-23449 - JIT: Record fake init calls for subtraces (fixes
array_mapoptimization) in GH-23450
arshidkv12
ext/standardFixround()for large integral doubles in GH-22461
Benedikt Franke
Daniel Scherzer
- [RFC] Deprecate
is_a()andis_subclass_of()with string when not allowed in GH-23236 - Add regression tests for calling
zend_version()in 4017211fd0 - Mark
zend_version()as@compile-time-evalin ce7896d514 zend_attributes.stub.php: remove an extra space in GH-23573
David Carlier
ext/sockets: CBPF reuseport CBPF filter improvements/strengthening in c98e10797bext/zip:ZipArchive::getNameIndex()index truncated to int in 473a7e0451ext/zip:php_zip_ops_stat()succeeds when the archive cannot be opened in 614afe7b09- streams: add so_rcvbuf and so_sndbuf socket context options in 203e59e549
Dmitry Rantovov
- sapi/phpdbg: restore the DEFAULT_SLASH check on the module path in GH-23583
Dmytro Kulyk
- gen_stub: Conditionally include
zend_attributes.hto arginfo based on usage in GH-21570
Georgij Tsarin
- Fix read buffer compaction in stream filter flush in GH-23439
- ftp: use SSL_write_ex() in
single_send()to fix signed/unsigned handling in GH-22967 - Fix sparse set allocation size overflow in GH-23482
Gina Peter Banyard
- mysqli: move behaviour existing only for
mysqli_fetch_object()into it in GH-23451 ext/date: Throw exceptions directly in GH-19166ext/zlib: packphp_zlib_filter_datastruct in 148932c848- Zend: assert that refcounted zval in zval_internal_ptr_dtor is a string in GH-23592
- standard/http_fopen_wrapper: use
zend_stringAPI inphp_stream_http_response_headers_parse()in 0a423006ff
Ilia Alshanetsky
- Close the keyword UEnumeration on
Locale::getKeywordsfailure in b2956e0bb3 - [intl] fix leak when iterating IntlBreakIterator parts iterators in 7d6523170e
- [http] Fix out-of-bounds read on empty Location header in 8196275133
- [standard] Fix crash when filter callback unsets StreamBucket::$data in 47bebf87a0
- Keep compiled RuleBasedBreakIterator rules alive for the iterator in 35b09eaead
- [mysqlnd] Fix OK packet message length buffer over-read in 9e5cf96095
- [SimpleXML] Fix creating new attributes via
attributes()dimension write in fc7a6b9007 - [intl] Size sortWithSortKeys buffers based on array size in GH-23504
- [mysqlnd] Fix result set field metadata length buffer over-read in 9c74d7d1bc
- [intl] Fix leak of time zone wrapper in Calendar debug info in b7a85ee111
- dom: invalidate node list caches on class attribute mutations in fbca6cb221
- [SOAP] Fix WSDL cache corruption when header defines headerfaults in f09a81ddee
- [DOM] Fix getNamedItemNS() with empty URI not matching null namespace in e832b5e3e7
- Revert the mysqlnd wireprotocol length-encoded bounds checks in e318023a6b
- [intl] Fix empty-needle
grapheme_strposoffsets in 1adadf07e5 - [intl] Record the ICU error code on Spoofchecker failures in GH-23520
- [mbstring] Fix
mb_ereg_replace()emitting NUL/garbage for unterminated \k<name> in 509e27bae1 - Clamp scale in bc_is_zero_for_scale to n_scale in 979c827cdc
- soap: reject self-referential schema group and attributeGroup fix-up in 797e3ea975
- odbc: check SQLColAttribute return codes in the field info functions in 0c2fc141fc
- simplexml: fix addChild() namespace filter on the returned element in 8b13fcc13e
- odbc: make
odbc_sql_error()formattable, drop odbc_colattribute_failed in GH-23612 - odbc: replace SQLError with SQLGetDiagRec in GH-23614
Joe Ferguson
- Update versions for PHP 8.6.0beta3 in fba33fcb5f
Jordi Kroon
ext/standard: Fix 1-char relative Location redirects after GH-23467 in de3436c76e
Julien Voisin
- Validate large run map entries instead of assuming them in GH-23366
- Sanity check huge block sizes before using them as
munmap()lengths in GH-23378 - Bind free list shadow pointers to their storage location in GH-23376
- Protect the cached chunk list against corruption in GH-23367
jvoisin
- Detect immediate double-frees of
zend_mmsmall slots in 383b5bb7c5
lacatoire
ext/pgsql: stop advertising PGSQL_DML_ASYNC where it is refused in 65ae1ad847ext/gd: report$sizewith the argument number of the function called in dddbca6ec6
Lazizbek Ergashev
- Fix GH-23457:
imagebmp()is extremely slow when writing to a file in d7778413a2 - Fix GH-23447: segfault when the SoapServer class fails to initialize in 8dafaf5da2
- Fix GH-23444: ODBC_ATTR_ASSUME_UTF8 corrupts Unicode data outside Windows in GH-23445
ext/hash: Fix buffer overflow inhash_pbkdf2()with a large output length in 13f5c4bda2- Exclude
zend_gdb.cfrom code coverage in GH-23593 - Fix GH-23576:
array_keys()on an empty array returns a non-zero next index in GH-23577 - Fix GH-23453: bad free with a context engine ID longer than 32 bytes in 6f49c1f209
Louis-Arnaud
ext/standard: declare true as the return type ofregister_tick_function()in GH-23432ext/readline: declare true as the return type ofreadline_completion_function()in GH-23433ext/filter: Narrow the return type offilter_var_array()to array|false in GH-23403ext/pcntl: fix declared signature ofpcntl_signal($restart_syscalls) in GH-23531ext/hash: report argument #2 ($filename) for null bytes inhash_file()in GH-23534ext/intl: report argument #3 ($variant) for an invalid IDNA variant in GH-23533- Fix wrong argument number and UB in fsockopen timeout error in GH-23431
ext/ftp: throw an Error whenftp_nb_fget()/ftp_nb_fput()hit a busy connection in GH-23540
Marc Bennewitz
ext/standard:Io\Poll\Context::wait()max events range check in b3cbd55a69- PDO: Migrate maxlen of pdo_column_data from size_t to
zend_longin GH-19144
Michael Orlitzky
ext/session: allow session.save_path to be nonempty in this test in e8c1e3a8b3
Máté Kocsis
- Expose the "binary layout strategy" option for the real-time benchmark in afc3ee5749
- Implement "Followup improvements for
ext/uri" RFC - WHATWG URL percent-encoding in GH-22820 ext/uri: Make internal function naming consistent in fa1faaaac7
NickSdot
ext/uri: Reorganises legacy tests in GH-23286ext/uri: Consistency follow up to GH-23286 in GH-23551ext/sockets: applied fixers to improve test robustness in GH-23135ext/openssl: applied fixers to improve test robustness in GH-23134
Ondřej Surý
ext/intl: fix build with older ICU in GH-23539
Piotr Hałas
ext/opcache: keep huge page remap inside the reserved range in GH-23554
Pratik Bhujel
Saki Takamachi
- Fixed the behavior when using FETCH_DEFAULT in GH-21864
- NEWS for GH-21864 in e0c1b29949
Shivam Mathur
- Fix race in OpenSSL CMS verification tests in GH-23559
Sjoerd Langkemper
- sapi/cli: support Expect 100-continue in PHP dev server in b8c43c35d1
ext/curl: add more tests in GH-23333ext/standard: add tests for HTTP fopen wrapper in GH-23557
Volker Dusch
- Keep EG(errors) buffer consistent on erealloc failure in GH-23257
Weilin Du
- Fix GH-23418: UAF when accessing mounted Phar subdirectories in GH-23442
- Tests: Migrate old extension checks from
SKIPIFto EXTENSIONS in GH-23473 - Fix GH-23477: Memory leak on duplicate native Phar manifest entries in GH-23479
- Fix GH-23459: Improve
imagegrabscreen()performance on Windows in GH-23485 ext/standard: Makestr_ends_withframeless in GH-23510- Tests: Drop ext/openssl/tests/CONFLICTS in GH-22472
- CI: Fix tests gh23444 on Windows in GH-23529
- Zend: Optimize sorting single-element arrays in GH-23550
ext/openssl: Fix remaining OpenSSL test races in GH-23565ext/standard: Makeltrim()andrtrim()frameless in 66c98704e2- Zend: Add
zval_try_get_double()in GH-23398
Yudai Takada
- Fix bounds check in multibyte UTF detection in GH-23527
Zachary DuBois
ext/sodium: Add crypto_kem (X-Wing) and crypto_kem_mlkem768 bindings in GH-23420
武田 憲太郎
ext/pdo_pgsql: FixPDO::CURSOR_SCROLLstatements failing under lazy fetching in 197bdc0a40ext/pdo_pgsql: Add Pdo`Pgsql::ATTR_CHUNK_SIZE` for chunked result fetching in f4a17fdefdext/pdo_pgsql: Fix CURSOR_SCROLL statements closing a nonexistent cursor in c1a7ab07ec