Release Information
- Release Type
- Security Update
- Release Status
- Latest
- Branch Status
- Supported (Latest)
Latest PHP release in the latest version. This release contains security fixes, and it is recommended to update as soon as possible.
PHP 8.6 continues to receive bug fixes and security fixes until 2028-12-31.
Downloads
Source Code
Git Clone
Use Git to clone the 8.6.0 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.6.0How 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.0-cli-alpineDebian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.6.0-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.0-fpm-alpineDebian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.6.0-apacheDebian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.6.0-fpmChangeLog
Core
- Fixed
array_map()optimization not resolving the function name of an FCC. - Fix potential ABI incompatibility when adding fields in patches by adding padding to globals.
- Fix function and constant imports in compile_to_ast and add support for grouping.
- Fixed bug GH-24668 (
zend_set_local_var()leaks the previous value of an existing CV). - Fixed unmapping of an unrelated range when the aligned chunk mmap fails
- Fixed bug GH-25023 (
ZEND_CONTAINER_OF()fails to compile with -std=c11). - Fixed AST printing dropping final on class constants and properties, and abstract on properties.
- Fixed AST export of readonly anonymous classes dropping the readonly modifier.
- Fixed memory leak of a duplicate named argument in new in initializer.
- Fixed bug GH-25061 ($x =
$x- 1 on null is optimized to PRE_DEC). - Fixed first-class callables to static methods in trait constant expressions resolving to the method of the first using class and bypassing visibility checks.
- Fixed bug GH-24184 (System ID not being reinitialized after an Apache graceful restart, potentially causing incompatible OPcache file cache entries to be reused).
- Fixed memory leak when an exception already contains the pending exception in its previous chain.
- Fixed bug GH-23979 (Nullsafe operator must not flush delayed oplines of an enclosing function).
- Fixed memory manager keeping a block reallocated to exactly the size of the next smaller bin in its larger bin, which
efree_size()then freed into the wrong one. - Fix throwing behaviour with recursive arrays in VM.
- Fixed skipped catch block when switching fibers during exception unwinding
- Fix escape analysis for objects implementing ArrayAccess.
- Fixed GH-23921 (Fibers start with error_reporting = 0 when the error_reporting INI directive is not set).
- Deprecated using "let" or "is" as the name of a class, function, or constant, and as an alias in
class_alias()and use declarations. - Deprecated using "_" as a constant name and as an alias for a class or constant in use declarations.
- Fixed incorrect internal pointer and foreach iterator positions when compacting arrays with holes.
- Fix handling of references to typed properties during unserialization of various internal classes.
- Fixed bug GH-23752 (Use scoped diagnostic suppression for the global register declarations so the caller's -Wvolatile-register-var state is restored).
- Fixed OSS-Fuzz #538730793 (Assertion failure when returning by-ref from closure invoke).
- Fixed OSS-Fuzz #540904105 (ASSERT: ast->attr == T_CLASS_C).
- Calling
is_a()oris_subclass_of()with a string as the first argument when$allow_stringis false is now deprecated. - Enabled the TAILCALL VM (--disable-gcc-global-regs) when building with GCC >= 16.
- Fixed GH-10497 (Allow direct mutation of objects stored in constants or class constants via OBJ->prop = $val).
- Using the return statement in a finally block is now deprecated.
- Deprecated "namespace" as a class constant name.
- Changed
run-tests.phpto run in parallel by default, using up to 10 automatically detected workers. Pass -j1 for sequential execution. - Allowed readonly properties to declare default values.
- Changed
run-tests.phpto run test subprocesses without a shell where possible. - Fixed GH-23121 (
is_callable()wrongly accepts objects with no get_closure handler). - Passing a 3rd argument to
define()is now deprecated. - Naming a function readonly is now deprecated.
- Added stateless closure cache.
- Implemented partial function application RFC.
- Compile
array_map()into aforeach()loop when using Partial Function Application as callback. - Fixed bug GH-22263 (reset typed property default on every unserialize failure path).
- Fixed bug GH-18847 (SEGV in
zend_fetch_debug_backtrace()when the memory limit is reached while the tracing JIT enters a call frame). - Sync Boost.Context assembly with 1.91.0.
- Fixed bug GH-22387 (AST pretty-printing drops meaningful parentheses around RHS of instanceof).
- Fixed bug GH-15672 and GH-15911 (Stack overflow when an internal function recurses through
zend_call_function, such as a self-attached SPL iterator). abort()instead ofexit()on hard OOM.- perf: ZTS: move AG and SCNG into native
__threadstorage. - Added first-class callable cache to share instances for the duration of the request.
- It is now possible to use reference assign on WeakMap without the key needing to be present beforehand.
- Added
clamp(). - Fix OSS-Fuzz #429429090 (Failed assertion on
unset()with uninitialized container). - Fixed GH-20564 (Don't call autoloaders with pending exception).
- Fixed bug GH-20174 (Assertion failure in
ReflectionProperty::skipLazyInitializationafter failed LazyProxy initialization). - Enabled the TAILCALL VM on Windows when compiling with Clang >= 19 x86_64.
- Deprecate specifying a nullable return type for
__debugInfo(). - Fixed bug GH-22046 (The unserialize function can lead to segfault when non-Serializable internal classes are serialized back with the C format).
- Fixed bug GH-22292 (AST pretty printing does not correctly handle invalid variable names).
- Fixed bug GH-22291 (AST pretty printing does not correctly handle braces in string interpolation).
- Fixed bug GH-22373 (AST pretty-printing drops meaningful parentheses surrounding property access).
- Fixed GH-22422 (
zend_arenalayout mismatch leaked memory in separately built extensions under AddressSanitizer). - TSRM: use local-exec TLS in PIE executables.
- perf: make all static extensions use TSRMG_STATIC.
- Fixed bug GH-22257 (type confusion in
Exception::getTraceAsString()). - TSRM: make CG, EG, SCNG and AG compile-time offsets.
- Deprecate returning values from
__construct()and__destruct(). - base_convert, bindex, hexdec and octdec now raise a notice when they cannot precisely convert the given number.
- Added error_include_args INI option to make the display of function arguments consistent in error output.
- Fixed GHSA-8mjj-2r7p-4hg2 (Use-after-free in magic method backtraces can lead to remote code execution). (CVE-2026-129474)
- Fixed GHSA-2fjv-p558-g82m (Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown). (CVE-2026-129182)
BCMath
- Added NUL-byte validation to BCMath functions.
Bz2
- Passing an object for the Bzip2 {de}compression stream filter is now deprecated. Use
get_object_vars()on the object instead. - Reject oversized input in bzdecompress().
Calendar
- Fixed *
tojd()functions andcal_to_jd()truncating arguments outside the int range instead of rejecting them.
CGI
- Fixed GHSA-5j3f-64r7-f564 (PHP-CGI out-of-bounds read and write during PATH_INFO correction). (CVE-2026-129538)
CLI
- Fixed bug GH-24697 (
PHP_HTTP_PARSER_STRICTbuild option doesn't work). - Fixed bug GH-9670 (List -C and -q in the CLI help).
- Fixed bug GH-23242 (PHP development server does not support Expect 100-continue flow control).
COM
- Fixed bug GH-25008 (
com_event_sink()andcom_print_typeinfo()crash resolving an event source with no loaded typelib).
Curl
- Fix use-after-free of
CURLOPT_STDERRstream on cloned curl handle. - Fix UAF on clone due to callback data pointer mismatch.
- Set content length using
CURLOPT_POSTFIELDSIZE_LARGEinstead of CURLOPT_POSTFIELDSIZE. This makes it possible to post strings larger than 2GB on some platforms, e.g. Windows. - Improved cURL option validation errors to include the option name.
- Raise a value error when the callback registered with
CURLOPT_READFUNCTIONreturns an unexpected long. - Fix bug GH-16513 (curl: exceptions in callbacks do not abort the request).
- Added
CURLOPT_SEEKFUNCTIONand the CURL_SEEKFUNC_OK,CURL_SEEKFUNC_FAILandCURL_SEEKFUNC_CANTSEEKconstants, letting libcurl rewind a streamed request body to resend it on a redirect, multi-pass authentication or a retried reused connection. - Add support for
CURLINFO_SIZE_DELIVERED(libcurl >= 8.20.0).
Date
- Update timelib to 2026.03
- Fixed bug GH-20503 (Assertion failure with
ext/dateDateInterval property hash construction). - Fixed bug GH-24350 (MINIT reads a stale external tz database after an in-process module restart).
- Added Time\Duration.
- Fixed bug GH-11368 (
idate()doesn't work for the year -1). - Fixed GHSA-gr4f-wgx5-jpfv (Timezone cache use-after-free can lead to remote code execution). (CVE-2026-129496)
DBA
- Fixed bug GH-24641 (ndbm backend never checks
dbm_open()return value, NULL deref on first use after a failed open).
DOM
- Fixed a use-after-free when reflected attribute setters replace an attribute whose child still has a live wrapper.
- Fix error paths in
dom_xml_serializing_a_document_node(). - Fixed reference cycles through DOMXPath and XSLTProcessor php:function callback arguments and return values not being collectable.
- Fixed a typo in the DOMException message for INUSE_ATTRIBUTE_ERR.
- Fixed bug GH-22624 (use-after-free via DOMNameSpaceNode after
DOMDocument::xinclude()). - Fixed Dom\DtdNamedNodeMap integer dimension access so negative indexes return NULL and indexes outside the int range throw ValueError instead of returning the first entity or notation.
- Fixed bug GH-22623 (use after free with namespace nodes from
XSLTProcessor::registerFunctions())/ - Fixed bug GH-22554 (use-after-free with XPath callback returning a node from a foreign document).
- Removed LIBXML_XINCLUDE from valid options for XMLDocument, as it was a no-op.
- Readonly DOM properties are now declared with asymmetric visibility (public private(set)).
ReflectionProperty::isWritable()reports them correctly, and external writes raise "Cannot modify private(set) property" instead of the previous readonly modification error. - Fixed Dom\Notation nodes missing tree connection, so that ownerDocument, parentNode, isConnected and baseURI now return correct values, and textContent returns NULL per the DOM specification.
- Fixed GHSA-x8r7-mg3g-74hg (Double free during DOM XML serialization). (CVE-2026-129501)
Embed
- Made php-cli functionality available in embed builds.
Exif
- Added support for reading EXIF metadata from WebP images (GH-19904).
FFI
- Fixed bug GH-24582 (Memory leaks in
ext/ffiparser whenfinalize_type()bails out).
Fileinfo
- Fixed bug GH-24289 (
finfo::file()reports the wrong argument number for an invalid $filename). - Upgrade to file 5.48.
- Fixed bug GH-20679 (
finfo_file()doesn't work on remote resources). - Fixed bug #66095 (Hide libmagic dynamic symbols).
FPM
- Fixed crash and stack memory disclosure in the worker output logging with a pool name longer than the message prefix buffer or log_limit.
- Fixed GHSA-jm4m-qfqx-967m (PHP-FPM epoll use-after-free can lead to local privilege escalation). (CVE-2026-129291)
- Fixed memory leaks of the _GET string on the status page error and HEAD request paths.
- Fixed use-after-free of the scoreboard copy when logging invalid status values.
- Fixed null pointer dereference in
fpm_get_status()when the scoreboard copy fails. - Fixed bug GH-24229 (
fcgi_close()passesshutdown()a literal 1, which is SHUT_RD in WASI). - Fixed GHSA-qc49-hpvq-g2w6 (PHP-FPM request smuggling through an unread HTTP request body). (CVE-2026-129289)
- Fixed GHSA-3mg3-cr28-46gc (PHP-FPM status endpoint XSS via unescaped user and script fields). (CVE-2026-129292)
FTP
- Fix double free in
ext/ftpdata_accept()on accept failure.
GD
- Fixed
imagetruecolortopalette()error message. - Fixed
imageaffinematrixget()to enforce the documented array|float type for the$optionsparameter. - imagesetstyle()/imagefilter()/
imagecrop()check array argument entries types.
GMP
- Added optional
$definitely_primeoutput parameter togmp_prevprime(). - Added
gmp_powm_sec(). - Added
gmp_prevprime(). - Fixed GMP power and shift operators to reject GMP right operands outside the unsigned long range instead of silently truncating them.
- Fixed GMP integer string parsing to reject strings containing NUL bytes instead of silently truncating them.
- Fixed GMP error messages that referenced outdated parameter names.
- Fixed bug GH-22549 (Assertion failure / UB on a compound GMP power or shift assignment with a negative exponent).
gmp_fact()reject values larger than unsigned long.- gmp_pow/binomial/root/rootrem and shift/pow operators reject values larger than unsigned long.
- GMP exponentiation and shift operators now emit a deprecation warning when converting a float right operand to int loses precision.
Hash
- Fix GOST and Snefru digests of 512 MiB or more.
- Fixed
hash_file()reporting argument #1 ($algo) instead of argument #2 ($filename) when the filename contains null bytes. - Upgrade xxHash to 0.8.2.
Intl
- Fixed IntlDateFormatter parse functions truncating an
$offsetbelow INT_MIN. - Fixed
Collator::sortWithSortKeys()allocating fixed 2MiB buffers regardless of array size. - 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. - Added static methods
IntlDatePatternGenerator::getSkeleton()andIntlDatePatternGenerator::getBaseSkeleton(). - Fixed
Collator::sort(),collator_sort(),Collator::asort(), andcollator_asort()to report UTF-8/UTF-16 conversion errors through the intl error handler instead of emitting a warning and continuing with an empty string. - Implemented GH-20255 (Add a predefined calendar constant in IntlDateFormatter for the proleptic gregorian calendar).
- Added
SpoofChecker::areBidiConfusable(). - Added
SpoofChecker::getBidiSkeleton(). - Added
SpoofChecker::getSkeleton(). - Fixed grammatical issues in Normalizer invalid form and IntlCalendar time zone offset error messages.
- Removed the dependency on the ICU IO library.
- Fixed
NumberFormatter::parse()andNumberFormatter::parseCurrency()to reject offset values outside the 32-bit range instead of silently truncating them. - IntlDateFormatter::parse()/
datefmt_parse()and IntlDateFormatter::localtime()/datefmt_localtime()now raise TypeError when the offset argument is not of type int. - Fixed malformed
ResourceBundle::get()error message when fallback is disabled. - Added
Locale::getDisplayKeyword()andLocale::getDisplayKeywordValue(), with the alias oflocale_get_display_keyword()andlocale_get_display_keyword_value()respectively. - Added IntlNumberRangeFormatter class to format an interval of two numbers with a given skeleton, locale, collapse type and identity fallback.
- Added
grapheme_strrev - Passing a non-stringable object as a time zone to Intl time zone argument handling now raises TypeError instead of Error.
IntlBreakIterator::getLocale()now raises ValueError for invalid locale types.- Fixed
MessageFormatter::parse()and parseMessage() returningPHP_INT_MINas float rather than int on 64-bit platforms. - Fixed
UConverter::transcode()silently truncating from_subst and to_subst option lengths greater than 127 bytes. - Fixed
IntlIterator::current()to return NULL instead of an undefined value when the iterator is not positioned on a valid element.
IO
- Added new polling API.
JSON
- Fixed
json_encode()leaving the recursion guard set on objects with hooked properties after running out of memory while escaping a property name. - Fixed
json_encode()silently narrowing$depthvalues outside the int range, which wrapped to an unrelated depth. - Fixed
json_encode()continuing to encode after an array or object key failed to encode. - Report unterminated JSON strings as syntax errors.
- Improve performance error position tracking during JSON decoding.
- Enriched JSON last error / exception message with error location.
LDAP
- Fix crash in
ldap_exop_sync()when$response_datais omitted.
MBString
- Fixed negative mbstring.regex_stack_limit and mbstring.regex_retry_limit on 32bit platforms.
- Fixed bug GH-23958 (truncated encoding names resolving to full names).
- Fixed out-of-bounds read in
php_mb_rfc1867_getword()on a multibyte lead byte at the end of a multipart field name. - Updated Unicode data tables to Unicode 18.0
- Passing objects to
mb_convert_variables()is now deprecated. ini_set()with mbstring.detect_order changes the order ofmb_detect_orderas intended, since mbstring.detect_order is an INI_ALL setting.- Added GB18030-2022 to default encoding list for zh-CN.
- mbregex has been deprecated.
MySQLi
- The
mysqli_get_charset()function andmysqli::get_charset()method are now deprecated. - The
mysqli_stmt_init()function andmysqli::stmt_init()method are now deprecated. - Instantiation of mysqli_stmt without providing the
$queryparameter is now deprecated. - Added
mysqli_quote_string()andmysqli::quote_string().
MySQLnd
- Fixed bug GH-24609 (OK packets without an info message rejected on x32 builds).
- Fixed bug GH-24293 (Segfault on connect with an empty password to a MariaDB PAM account).
ODBC
- Fixed bug GH-25036 (
odbc_prepare()corrupts the heap when the driver cannot describe a parameter). odbc_error()andodbc_errormsg()now also report SQLColAttribute failures.
Opcache
- Fixed bug GH-24397 (Assertion failure when dumping JIT IR).
- Fixed tracing JIT returning a wrapped integer instead of a float on integer overflow after an integer was compared with a float or numeric-string literal.
- Fixed use-after-free in JIT ASSIGN_DIM_OP when concatenating into an empty array element.
- Fixed bug GH-24396 (Assertion failure in
zend_jit_def_reg()"reg forwarding" with chained Pi nodes). - Fixed JIT treating an array as packed after a string key write turned it into a hash.
- Fixed bug GH-24436 (Tracing JIT: keep the SEND_VAL type guard after assigning to a reference).
- Fixed bug GH-24745 (File cache loses attributes on constants on 32-bit builds).
- Fixed bug GH-17733 (System entropy does not take into account function order, resulting in wrong functions possibly called in different configurations).
- Fixed bug GH-24438 (Preserve indirect types in JIT side traces).
- Fixed bug GH-24577 (CE-cache flag on interned class name visible before map_ptr offset).
- Fixed tracing JIT losing register-allocated CVs when an interrupt is handled at the end of a loop trace.
- Fixed bug GH-24675 (function with >~1.7 MB of machine code corrupts JIT buffer accounting).
- Call
orig_post_shutdown_cb(). - Fixed JIT segfault on switch over a string reference holding a non-string value.
- Fixed AArch64 JIT encoding of invalid logical immediates.
- Fixed JIT crashes when handling a VM interrupt with a stale saved opline in the tailcall VM.
- Fixed function JIT misinterpreting VM-enter results after an interrupt callback in the CALL and TAILCALL VMs.
- Fixed unsound shift_left_overflows range when shift wraps.
- Fixed bug GH-23572 (Tracing JIT calls the wrong method for self::/parent:: static calls in trait methods shared by several classes).
- Fix block pass dropping
ZEND_FAST_CALLOP2 definition. - Fixed bug GH-23626 (orphaned temporaries cause leaks and assertions).
- Fix preloaded functions JIT-compiled on load being overwritten after restart.
- Fix opcache.interned_strings_buffer being 0 in threads started later (ZTS).
- Fixed potential infinite recursion/hang (HYBRID/TAILCALL respectively) when
zend_interrupt_functionresets EG(vm_interrupt). - Fix JIT losing the called scope of self::/parent:: calls in included files.
- Fixed preloaded functions not JIT-compiled again after OPcache restart.
- Fixed bug GH-24988 (Incorrect opcode range check causes bugs with exceptions in function JIT).
- Fix opcache phar check.
- Fixed bug GH-17626 (JIT corrupts an opline handler when blacklisting a root trace at the opcache.jit_max_root_traces limit, causing spurious "Too few arguments" errors and crashes).
- Fix type inference of ADD_ARRAY_UNPACK with integer keys.
- Fix too wide type inference for ASSIGN_DIM_OP.
- Fix OSS-Fuzz #568005340 (FETCH_DIM_FUNC_ARG partial conversion).
- Fix exception checks due to NAN warnings and object
empty()'s. - Fixed bug GH-24270 (JIT loses the called scope of self:: and parent:: calls in closures).
- Fixed bug GH-24337 (JIT: segfault when decrementing a non-numeric string property).
- Fixed bug GH-24185 (Windows ZTS: random access violations with OPcache JIT in multi-process setups).
- Fix SIGFPE on LONG_MIN % -1 with a constant divisor.
- Fixed bug GH-24388 (Tracing JIT: segfault when a trace runs out of side exits).
- Fixed bug GH-24391 (JIT switch on constant null takes default instead of case 0).
- Fixed bug GH-24206 (Tracing JIT loses loop-carried CV when its loop PHI is reloaded from memory).
- Fixed bug GH-24386 (JIT: register operand must be loaded before the typed reference check).
- Fixed bug GH-24437 (JIT: Fix OP_DATA read from an unwritten slot in
zend_jit_assign_dim_op()). - Fixed bug GH-24398 (JIT: minimal JIT segfault when a hooked property is passed to a run-time-resolved function).
- Fixed bug GH-24389 (Tracing JIT: type guard on entry of an inlined call exits with an uninitialized opline).
- Re-enable JIT for ZTS builds on Apple Silicon.
- Fixed bug GH-20051 (apache2 shutdowns when restart is requested during preloading).
OpenSSL
- Fixed use-after-free in TLS server ALPN and Windows certificate checks when the session stream passed to
stream_socket_enable_crypto()is closed before the handshake. - Fixed build with OpenSSL 4.1.
- Fixed bug GH-24784 (
openssl_pkcs7_read()andopenssl_cms_read()overwrite certificates with CRLs). - Added
$salt_lengthparameter toopenssl_sign()andopenssl_verify()with new OPENSSL_RSA_PSSSALTLEN* constants. - Added AES-SIV support.
- Implemented GH-20310 (No critical extension indication in
openssl_x509_parse()output). - Added TLS session resumption support for streams with new context options and Openssl\Session class.
- Added TLS external PSK support for streams with new context options and Openssl\Psk class.
- Added TLS 1.3 early data (0-RTT) support for streams with new context options early_data, max_early_data and early_data_cb.
- Added stream crypto status for exposing OpenSSL WANT_READ / WANT_WRITE.
PCNTL
- Fixed the declared signature of
pcntl_signal(), whose$restart_syscallsargument accepts null and defaults to it. pcntl_exec()now throws a ValueError if the$argsarray is not a list array.
PDO
- Fixed invalid ATTR_ORACLE_NULLS values being accepted and truncated.
- Fixed a duplicate warning when ATTR_STATEMENT_CLASS is rejected on a persistent connection.
- Fixed constructor option errors naming argument #3 ($password) instead of argument #4 ($options).
- Fixed
pdo_raise_impl_error()emitting a warning under ERRMODE_SILENT.
PDO_DBLIB
- Added dblib_handle_check_liveness handler.
PDO_Firebird
- Fixed bug GH-25006 (getColumnMeta() reads out of bounds for an out-of-range column index).
PDO_PGSQL
- Fixed bug GH-24461 (DISCARD ALL on persistent connection cleanup drops PgBouncer's prepared statements).
- Fixed a use-after-free when a persistent connection receives a notice after the request that called
Pdo\Pgsql::setNoticeCallback()has ended. - Fixed crash when a persistent connection fails.
- Added Pdo`Pgsql::ATTR_CHUNK_SIZE` to fetch a result set in chunks of the given number of rows.
- Clear session-local state disconnect-equivalent processing.
PDO_SQLite
- Fixed bug GH-24990 (Statement unusable after a failed
execute()).
PGSQL
- Fixed the
pg_insert(),pg_update()andpg_delete()flag error messages, which did not name the set of flags actually accepted. - Fixed the class name casing of
pg_close_stmt()'s connection parameter. - Enabled 64 bits support for pg_lo_truncate()/
pg_lo_tell()if the server supports it. pg_fetch_object()now surfaces non-instantiable class errors before fetching, resolves the constructor via the get_constructor handler, and reports the empty-constructor ValueError on the$constructor_argsargument.
Phar
- Fixed bug GH-25093 (
Phar::webPhar()redirect reads past the request URI). - Fixed bug GH-25089 (Heap buffer over-read via crafted alias size in zip-based phar).
- Fixed bug GH-8469 (
Phar::decompressFiles()andPhar::compressFiles()retain compressed contents after changing compression). - Fixed bug GH-24740 (Oversized tar metadata exhausts the memory limit).
- Fixed bug GH-25090 (UAF in phar
rename()of an entry with metadata). - Fixed bug GH-25091 (UAF in phar
rename()when source and destination are equal). - Fixed bug GH-25092 (Double free in
Phar::copy()on link and mounted entries). - Fixed bug GH-24531 (Crash when modifying a zip-based phar whose file was renamed).
- Fixed
Phar::buildFromIterator()accepting a negative getMTime() on 32bit platforms. - Fixed Phar archives being automatically detected when ".phar" only occurs in a directory name or is not a filename extension in an included file's path.
- Fixed grammatical issues and outdated terminology in Phar error messages.
- Support reference values in
Phar::mungServer(). - Invalid values now throw in
Phar::mungServer()instead of being silently ignored. - Fixed a bypass of the magic ".phar" directory protection in
Phar::addEmptyDir()for paths starting with "/.phar". Phar::addEmptyDir()now allows non-magic directory names that merely share the ".phar" prefix.- Support overridden methods in SplFileInfo for getMTime() and getPathname() when building a phar.
- Mark
Phar::buildFromIterator()base directory argument as a path. - Fixed GHSA-68fq-fh7h-f8gr (PHAR OpenSSL signature bypass via algorithm downgrade). (CVE-2026-128090)
PHPDBG
- Fix wrong command names.
- Fixed GH-22480 (Use-after-free when re-watching an already-watched variable).
POSIX
- Fixed
posix_setrlimit()rejecting POSIX_RLIMIT_INFINITY on Solaris.
Readline
- Fixed a crash in
readline_info()when completion_append_character contains a non-ASCII byte. - Fixed class constant completion in the interactive shell.
Reflection
- Added
ReflectionAttribute::inNamespace(),ReflectionAttribute::getNamespaceName(), andReflectionAttribute::getShortName(). - Added
ReflectionConstant::inNamespace(). - Added
ReflectionProperty::isReadable()and ::isWritable(). - Fixed bug GH-21362 (ReflectionMethod::invoke/invokeArgs() did not verify Closure instance identity for
Closure::__invoke()). - Added
ReflectionParameter::getDocComment().
SAPI
- Fixed infinite loop in
sapi_header_op()for headers of 4 GiB or more.
Session
- Validate whole session ID instead of stopping at the first NUL byte.
- Fixed
session_write_close()keeping the save handler open when the session data cannot be encoded. - Fixed bug GH-23056 (missing handler name in session write warning).
SessionHandler::validateId()is now implemented, so session.use_strict_mode applies to the built-in handler.- It is now deprecated to pass an object that does not implement the
create_sid()and validateId() methods. - A deprecation is now emitted when implementing SessionHandlerInterface on a class which doesn't define the
create_sid()or validateId() methods, as those will be moved from SessionUpdateTimestampHandlerInterface and SessionIdInterface to SessionHandlerInterface. - Fixed bug 71162 (updateTimestamp never called when session data is empty).
- Null bytes in
session.cookie_path,session.cookie_domain, andsession.cache_limiter are now rejected with a warning. session.cookie_samesite now rejects invalid values with a warning; only "Strict", "Lax", "None", or "" are accepted.session.cookie_lifetime now rejects non-integer and out-of-range values with a warning.- Session file GC now recursively cleans nested subdirectories when session.save_path uses the dirdepth prefix.
- Changed defaults of session.use_strict_mode (now 1),
session.cookie_httponly (now 1) andsession.cookie_samesite (now "Lax"). - Fixed GHSA-fm2m-fjf5-v3cp (Partially overwritten session files can lead to remote code execution). (CVE-2026-126714)
- Fixed GHSA-658j-r8rw-q6mx (Session serializer mismatch can lead to remote code execution). (CVE-2026-115560)
- Fixed GHSA-g3vh-838c-65v7 (Use-after-free after interrupted session shutdown). (CVE-2026-129481)
Shmop
- Fixed bug GH-9945 (
shmop_open()silently truncates keys outside the key_t range).
SimpleXML
SimpleXMLElement::__construct()now raises a ValueError when the$dataargument contains NUL bytes.
SNMP
- It is now possible to use the AES192, AES192C, AES256, and AES256C as SNMPv3 security protocols if the underlying library supports them.
- It is now possible to reset the MIB tree using the new
snmp_init_mib()function. - Additional MIB parsing and output control functionality has been exposed via the
snmp_set_mib_option(),snmp_set_output_option(),snmp_set_string_output_format()functions, the $numeric_index, $numeric_timeticks, $extended_index, $dont_print_units, $escape_quotes,$print_hex_textSNMP properties, and theSNMP::setOidOutputFormat(),SNMP::setStringOutputFormat()methods.
SOAP
- Fixed bug GH-23686 (SoapClient only strips
Authorization: Basicwhen a WSDL imports from another host). - Fixed header injection through the Content-Type context option, the soapaction and the cookie names and values.
- Fixed the SoapClient and SoapServer "classmap" option to reject arrays containing integer keys, and made SoapClient throw TypeError/ValueError for invalid "classmap" options.
- Fixed bug GH-22585 (OOM on bailout with uninitialized
do_request()parameters). - Fixed xsd:hexBinary decoding to reject odd-length values instead of silently truncating the last nibble.
- Made SOAP encoding errors report the affected type or failing operation instead of the generic "Violation of encoding rules" message.
Soap::__setCookie()when cookie name is a digit is now not stored and represented as a string anymore but a int.- Fixed bug GH-21421 (SoapClient typemap property breaks engine assumptions).
- WSDL/XML Schema parsing now rejects out-of-range integer values for occurrence constraints and integer restriction facets. Negative minOccurs and maxOccurs values are rejected as well.
- Fixed GHSA-q23r-hr55-xmpg (SOAP information disclosure through malformed array dimensions). (CVE-2026-15353)
- Fixed GHSA-4646-p932-gw34 (SOAP use-after-free when processing DTD entity references). (CVE-2026-129506)
Sockets
- Fixed bug GH-24748 (
socket_set_option()crashes with declared object properties). - Fixed
socket_set_option()withSO_ATTACH_REUSEPORT_CBPFand a zero value, which detached the classic BPF filter instead of the reuseport program. - Fixed
socket_set_option()validation error messages for UDP_SEGMENT and TCP_USER_TIMEOUT, andSO_LINGERoptions. - Added the
TCP_USER_TIMEOUTconstant for Linux to set the maximum time in milliseconds transmitted data can remain unacknowledged. - Added AF_UNSPEC support for
sock_addrinfo_lookup()as a sole umbrella for AF_INET* family only. - Fixed GH-20532 (
socket_addrinfo_lookupgives the error code with a new optional parameter). - Added AF_PACKET support completion for
socket_sendto()/socket_recvfrom().
Sodium
- Added support for the libsodium 1.0.22 KEM APIs (X-Wing and ML-KEM768).
- Fixed incorrect parameter name in
sodium_add(),sodium_memcmp(), andsodium_compare()length-mismatch error messages. - Added support for libsodium 1.0.21 IPcrypt and XOF APIs.
- pwhash argument-validation errors now throw ValueError instead of SodiumException.
SPL
- Fixed bug GH-24264 (Unwind/GracefulExit discarded in
spl_iterators.c). - Fixed bug GH-23385 (
SplDoublyLinkedList::serialize()use-after-free when__serialize()removes an element). - The following SplFileObject methods have been deprecated
SplFileObject::fgetcsv(),SplFileObject::fputcsv(),SplFileObject::setCsvControl(), andSplFileObject::getCsvControl(). - The
spl_classes()function is now deprecated, useReflectionExtension::getClassNames()instead. - The
spl_object_hash()function is now deprecated, usespl_object_id()instead. - The following ArrayIterator methods are now deprecated:
ArrayIterator::getFlags()ArrayIterator::setFlags()ArrayIterator::asort()ArrayIterator::ksort()ArrayIterator::uasort()ArrayIterator::uksort()ArrayIterator::natsort()ArrayIterator::natcasesort()ArrayIterator::unserialize()ArrayIterator::serialize() - DirectoryIterator key can now work better with filesystem supporting larger directory indexing.
- Fixed bug GH-21831 (
SplObjectStorage::removeAllExcept()use-after-free with re-entrant getHash()). - Fix bugs GH-8561, GH-8562, GH-8563, and GH-8564 (Fixing various SplFileObject iterator desync bugs).
- Fix bug GH-22062 (SplDoublyLinkedList iterator UAF via destructor releasing next node).
SQLite3
- Fix NUL byte truncation in sqlite3 TEXT column handling.
Standard
- Fixed memory leaks in
checkdnsrr()anddns_check_record()on Windows. - Fixed
__unserialize()and__wakeup()being called for objects with a missing closing brace. - Fixed bug GH-24308 (Request shutdown calls
closelog()even when syslog was not opened by PHP). - Fixed bug GH-24552 (Case-insensitive
substr_compare(),ksort()andkrsort()are still locale-dependent). - Fix use-after-free in
Randomizer::shuffleArray()when the engine throws. - Fixed
password_get_info()andpassword_needs_rehash()accepting malformed bcrypt costs. - Fixed
proc_open()null descriptor not being inheritable on Windows. - Don't share the
unserialize()context with enum autoloaders. - Fixed bug GH-24399 (
usleep()andtime_nanosleep()ignore queued APCs on Windows). - Fixed
glob()not negating bracket expressions that start with "^". - Fixed bug GH-24605 (
var_export()crashes on deeply nested arrays and objects). - Fixed bug #60110 (
fclose(),file_put_contents(),copy()do not return false properly). - Fixed bug GH-23780 (unserialize('') fails silently).
- Fixed an out-of-bounds read when following a redirect response with an empty Location header.
- Fixed incorrect parameter name in
convert_uudecode()warning. - Added support for the "<" and ">" endianness modifiers in
pack()andunpack()format codes. - Passing an object as the
$dataargument tohttp_build_query()is now deprecated. The interpretation of object values within$dataas arrays is also deprecated. Convert objects to arrays withget_object_vars()before calling the function. - Added the "filter.max_filter_count" stream context option for php://filter URLs. Using more than 16 filters without configuring this option is now deprecated.
- The
metaphone()function is now deprecated, use a userland phonetic matching library instead. - Improved performance of
array_intersect(). - Fixed bug GH-23006 (
phpcredits()full-page HTML title saysphpinfo()). - The following functions now raise a ValueError when the
$filenameargument contains NUL bytes:fileperms(),fileinode(),filesize(),fileowner(),filegroup(),fileatime(),filemtime(),filectime(),filetype(),is_writable(),is_readable(),is_executable(),is_file(),is_dir(),is_link(),file_exists(),lstat(), stat(). - Fixed bug GH-22818 (
stream_filter_register()orphaned user_filter_map on shutdown re-registration). - Passing an object to
array_walk{_recursive} is now deprecated. Useget_object_vars()on the object instead. - The
is_double()function is now deprecated, useis_float()instead. - The
is_long()andis_integer()functions are now deprecated, useis_int()instead. - The
doubleval()function is now deprecated, usefloatval()instead. - The
strcoll()function is now deprecated, useCollator::compare()instead. - The SORT_LOCALE_STRING constant for the family of sort functions is now deprecated, use one of the following functions instead:
Collator::asort()Collator::sort()*Collator::sortWithSortKeys() - Fixed
setlocale()to reject locale names containing NUL bytes instead of silently truncating them, and to reject arrays passed after the$localesargument or additional arguments passed after an array$localesargument. - Fixed
sleep()andusleep()to reject values that overflow the underlying unsigned int timeout. - Fixed bug GH-22671 (assert.bail aborts the process when the assert callback throws an exception whose reporting re-throws).
- Added form feed (\f) in the default trimmed characters of
trim(),rtrim()and ltrim(). - Invalid mode values now throw in
array_filter()instead of being silently defaulted to 0. - Fixed bug GH-21058 (
error_log()crashes with message_type 3 and null destination). - Fixed bug GH-13204 (
glob()fails if square bracket is in current directory). - Add array size maximum to
array_diff(). - Add enum SortDirection.
pathinfo()raises a ValueError with an invalid$flagsargument.- Passing an invalid flag value to the second argument of
scandir()will now throw a ValueError. array_change_key_case()now raises a ValueError when an invalid$caseargument value is passed.linkinfo()now raises a ValueError when the argument is an empty string.getenv()andputenv()now raises a ValueError when the first argument contains NUL bytes.- dl() now raises a ValueError when the
$extension_filenameargument contains NUL bytes. openlog()now raises a ValueError when the$prefixargument contains NUL bytes.parse_str()now raises a ValueError when the$stringargument contains NUL bytes.proc_open()now raises a ValueError when the$cwdargument contains NUL bytes.ini_get_all()now includes the built-in default value in the details.- Fixed bug GH-17384 (
number_format()may exhaust memory with decimals outside the range from -2147483648 to 2147483647). - Fixed bug GH-20862 (null pointer dereference in
php_mail_detect_multiple_crlfvia error_log). - Fixed GHSA-f6gg-rchx-xw8j (Mixed-case HTTPS and FTPS URLs can expose data in plaintext). (CVE-2026-128064)
- Fixed GHSA-mmf9-xm3v-hg2x (Denial of service through folded HTTP response headers). (CVE-2026-127960)
Streams
- Fixed bug GH-24508 (HTTP wrapper leaks the dechunk filter when header parsing fails after Transfer-Encoding).
- Fixed bug GH-24509 (HTTP wrapper leaks Location buffer on empty Location header).
- Fix out-of-bounds reads parsing ftp:// wrapper server replies.
- Added so_rcvbuf and so_sndbuf stream socket context options, setting the socket receive and send buffer sizes in bytes.
- Added a new IO copy API used by
php_stream_copy_to_stream_ex()that leverages platform primitives (sendfile, splice, copy_file_range, TransmitFile) for faster stream copying. - Added new stream errors API including new StreamException, StreamError classes, StreamErrorStore, StreamErrorMode, StreamErrorCode enums,
stream_last_errors()andstream_clear_errors()functions, error_mode, error_store and error_handler stream context options and extending some stream functions with context param. - Added so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt stream socket context options.
- Added so_reuseaddr streams context socket option that allows disabling address resuse.
- Added so_linger stream socket context option.
- Allowed filtered streams to be casted as fd for select.
- Fixed bug GH-21221 (Prevent closing of innerstream of php://temp stream).
- Improved
stream_socket_server()bind failure error reporting. - Fixed bug #49874 (
ftell()andfseek()inconsistency when using stream filters).
Sysvshm
- Fixed
shm_attach()to throw ValueError for keys outside the key_t range.
Tidy
- Fixed
tidy_repair_string(),tidy_repair_file(),tidy::repairString()andtidy::repairFile()rejecting null for $encoding.
URI
- Upgrade to uriparser 1.0.3. (CVE-2026-48841)
- Added
Uri\Rfc3986\Uri::getUriType()andUri\WhatWg\Url::isSpecialScheme(). - Added
Uri\Rfc3986\Uri::getHostType()andUri\WhatWg\Url::getHostType(). - Added Uri\Rfc3986\UriBuilder.
- Fixed GHSA-mg3p-mxj9-g2mm (Incorrect RFC 3986 URI serialization for oversized input). (CVE-2026-129438)
Windows
- Fixed bug GH-25009 (GetConsoleTitleW() buffer size passed in bytes).
- Fixed
sapi_windows_cp_set()andsapi_windows_cp_conv()accepting a negative codepage on 32bit platforms.
Zip
- Reject broken libzip versions 1.3.1, 1.7.0 and 1.12.0 during Windows configuration.
- Excluded libzip 1.12.0 due to a regression preventing additions and replacements in torrentzip archives.
- Fixed use-after-free when re-entering ZipArchive during destruction or a close warning, and rejected opening streams while closing.
- Fixed a use-after-free when a ZipArchive method that modifies the archive is called from a progress or cancel callback during close().
- Fixed bug GH-23899 (Assertion failure when a cancel callback returns an invalid type during shutdown).
- Fixed bug GH-22176 (memory leak with
ZipArchive::registerCancelBack()is used with reference returning function during shutdown). ZipArchive::addGlob()andZipArchive::addPattern()now raise a TypeError for invalid "remove_all_path", "comp_method", "comp_flags", and "enc_method" options instead of emitting a warning.- Fixed bug GH-21682 (ZipArchive instances should not be serializable). serialize()/
unserialize()now throw unless a subclass overrides__serialize()/__unserialize(). - Fixed ZipArchive callback being called after executor has shut down.
- Support minimum version for libzip dependency updated to 1.0.0.
- Added
ZipArchive::openString()method.
Zlib
- Fixed bug GH-24533 (zlib.lib could not be found because zlib 1.3.2 CMake build does not emit it).
- Fixed use-after-free when an error handler removes a failing zlib.inflate filter (GH-24176).
- Fixed bug GH-22142 (Assertion failure in
deflate_init()when an option object has uninitialised typed properties). - Passing an object for the zlib deflate and inflate stream filter is now deprecated. Use
get_object_vars()on the object instead. - Passing an object to the
$optionargument to deflate_init and inflate_init is now deprecated. Useget_object_vars()on the object instead. deflate_init()now raises a TypeError when the value for option "level", "memory", "window", or "strategy" is not of type int.inflate_init()now raises a TypeError when the value for option "window" is not of type int.