php8.5
← All releases
PHP 8.5 Thursday, 07 May 2026

PHP 8.5.6

42 changes across 21 components.

Core

  • Fixed bug GH-19983 (GC assertion failure with fibers, generators and destructors).
  • Fixed ZEND_API mismatch on zend_ce_closure forward decl for Windows+Clang.
  • Fixed bug GH-21504 (Incorrect RC-handling for ZEND_EXT_STMT op1).
  • Fixed bug GH-21478 (Forward property operations to real instance for initialized lazy proxies).
  • Fixed bug GH-21605 (Missing addref for Countable::count()).
  • Fixed bug GH-21699 (Assertion failure in shutdown_executor when resolving self::/parent::/static:: callables if the error handler throws).
  • Fixed bug GH-21603 (Missing addref for __unset).
  • Fixed bug GH-21760 (Trait with class constant name conflict against enum case causes SEGV).

CLI

  • Fixed bug GH-21754 (`--rf` command line option with a method triggers ext/reflection deprecation warnings).

Curl

  • Add support for brotli and zstd on Windows.

DOM

FPM

Iconv

  • Fixed bug GH-17399 (iconv memory leak on bailout).

Lexbor

  • Upgrade to lexbor v2.7.0.

MBString

Opcache

  • Fixed bug GH-21158 (JIT: Assertion jit->ra[var].flags & (1<<0) failed in zend_jit_use_reg).
  • Fixed bug GH-21593 (Borked function JIT JMPNZ smart branch).
  • Fixed bug GH-21460 (COND optimization regression).
  • Fixed faulty returns out of zend_try block in zend_jit_trace().

OpenSSL

  • Fix memory leak regression in openssl_pbkdf2().
  • Fix a bunch of memory leaks and crashes on edge cases.

PDO_Firebird

PDO_PGSQL

  • Fixed bug GH-21683 (pdo_pgsql throws with ATTR_PREFETCH=0 on empty result set).

Phar

  • Restore is_link handler in phar_intercept_functions_shutdown.
  • Fixed bug GH-21797 (phar: NULL dereference in Phar::webPhar() when SCRIPT_NAME is absent from SAPI environment).
  • Fix memory leak in Phar::offsetGet().
  • Fix memory leak in phar_add_file().
  • Fixed bug GH-21799 (phar: propagate phar_stream_flush return value from phar_stream_close).
  • Fix memory leak in phar_verify_signature() when md_ctx is invalid.

Random

  • Fixed bug GH-21731 (Random\Engine\Xoshiro256StarStar::__unserialize() accepts all-zero state).

Session

  • Fixed memory leak when session GC callback return a refcounted value.

SOAP

SPL

  • Fixed bug GH-21499 (RecursiveArrayIterator getChildren UAF after parent free).
  • Fix concurrent iteration and deletion issues in SplObjectStorage.

Sqlite3

  • Fixed wrong free list comparator pointer type.

Standard

Streams

URI