PHP 8.6.0beta3: Downloads, Changelog, News

Release Information

Release
8.6.0beta3
PHP Version
PHP 8.6
Release Date
Release Type
Bug Fix Release
Release Status
QA Release Latest
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. This is the latest QA release in the series.

ChangeLog

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() or is_subclass_of() with a string as the first argument when $allow_string is false is now deprecated.
  • Fixed bug GH-23232 (lone namespace separator asks the autoloader for an empty class name).

CLI

  • Fixed bug GH-23242 (PHP development server does not support Expect 100-continue flow control).

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.

Hash

  • Fixed hash_file() reporting argument #1 ($algo) instead of argument #2 ($filename) when the filename contains null bytes.

Intl

  • Fixed grapheme_strpos() and grapheme_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() and idn_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() and odbc_field_type() returning uninitialized memory when SQLColAttribute fails.
  • odbc_error() and odbc_errormsg() now also report SQLColAttribute failures.

PCNTL

  • Fixed the declared signature of pcntl_signal(), whose $restart_syscalls argument 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() and pg_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() with SO_ATTACH_REUSEPORT_CBPF and 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_map optimization) in GH-23450

arshidkv12

  • ext/standard Fix round() for large integral doubles in GH-22461

Benedikt Franke

  • Fix GH-23232: lone namespace separator asks the autoloader for an empty class name in GH-23233

Daniel Scherzer

  • [RFC] Deprecate is_a() and is_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-eval in ce7896d514
  • zend_attributes.stub.php: remove an extra space in GH-23573

David Carlier

  • ext/sockets: CBPF reuseport CBPF filter improvements/strengthening in c98e10797b
  • ext/zip: ZipArchive::getNameIndex() index truncated to int in 473a7e0451
  • ext/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.h to 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-19166
  • ext/zlib: pack php_zlib_filter_data struct in 148932c848
  • Zend: assert that refcounted zval in zval_internal_ptr_dtor is a string in GH-23592
  • standard/http_fopen_wrapper: use zend_string API in php_stream_http_response_headers_parse() in 0a423006ff

Ilia Alshanetsky

  • Close the keyword UEnumeration on Locale::getKeywords failure 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_strpos offsets 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

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_mm small slots in 383b5bb7c5

lacatoire

  • ext/pgsql: stop advertising PGSQL_DML_ASYNC where it is refused in 65ae1ad847
  • ext/gd: report $size with 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 in hash_pbkdf2() with a large output length in 13f5c4bda2
  • Exclude zend_gdb.c from 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 of register_tick_function() in GH-23432
  • ext/readline: declare true as the return type of readline_completion_function() in GH-23433
  • ext/filter: Narrow the return type of filter_var_array() to array|false in GH-23403
  • ext/pcntl: fix declared signature of pcntl_signal($restart_syscalls) in GH-23531
  • ext/hash: report argument #2 ($filename) for null bytes in hash_file() in GH-23534
  • ext/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 when ftp_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_long in 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-23286
  • ext/uri: Consistency follow up to GH-23286 in GH-23551
  • ext/sockets: applied fixers to improve test robustness in GH-23135
  • ext/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

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-23333
  • ext/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 SKIPIF to 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: Make str_ends_with frameless 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-23565
  • ext/standard: Make ltrim() and rtrim() 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: Fix PDO::CURSOR_SCROLL statements failing under lazy fetching in 197bdc0a40
  • ext/pdo_pgsql: Add Pdo`Pgsql::ATTR_CHUNK_SIZE` for chunked result fetching in f4a17fdefd
  • ext/pdo_pgsql: Fix CURSOR_SCROLL statements closing a nonexistent cursor in c1a7ab07ec
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.