PHP 8.5.6: Downloads, Changelog, News

Release Information

Release
8.5.6
PHP Version
PHP 8.5
Release Date
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.5 continues to receive bug fixes and security fixes until 2027-12-31.

Downloads

Source Code

Git Clone
Use Git to clone the 8.5.6 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.5.6
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.
php-8.5.6-x64NTS.zip
SHA256: e25cc9400a7d176f18074f677ef0159d6b04aecfb255c924d808b7144075092f
php-8.5.6-x86NTS.zip
SHA256: 8f56f338afc366164bb675b0f6206db5dabcdd608c5fd176ff874aca78e9a056
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.
php-8.5.6-x64TS.zip
Size: 0 MiB SHA256: 38c20264dcfb098cbec3b2b25bc21312e436b87dceadc76725aa1d7cf80be1fc
php-8.5.6-x86TS.zip
Size: 0 MiB SHA256: eac6c970e692cd6019d66d56ccff67cd845130a8fc831daeedb2b25c1cb1f71d

ChangeLog

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

  • Fixed bug GH-21566 (Dom\XMLDocument::C14N() emits duplicate xmlns declarations after setAttributeNS()).

Iconv

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

Lexbor

  • Upgrade to lexbor v2.7.0.

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_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.

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.

Streams

  • Fixed bug GH-21468 (Segfault in file_get_contents w/ a https URL and a proxy set).

URI

Commit List

Arnaud Le Blanc

Calvin Buckley

  • ext/pdo_odbc: Require non-empty string when building string buffer in GH-21652

Daniel Scherzer

David Carlier

Dmitry Stogov

DubbleClick

  • Fix ZEND_API mismatch on zend_ce_closure forward decl for Windows+Clang in 35258957cd

Gina Peter Banyard

Hans Krentel (hakre)

  • Add date.timezone=UTC to the INI overwrites in run-tests.php in d1670fb7e1

Ilia Alshanetsky

  • Fix GH-19983: GC assertion failure with fibers, generators and destructors in b15c5972fb
  • Fix GH-17399: iconv memory leak on bailout in 38628e89a5
  • Fix GH-21478: Forward property operations to real instance for initialized lazy proxies in 9c082438f4
  • Fix build: use php_globfree wrapper in ZipArchive::addGlob early returns in 556757dcff
  • Fix GH-21730: Mt19937::__debugInfo() leaks state HashTable when the serialize callback fails in GH-21733
  • Fix GH-21731: Random\Engine\Xoshiro256StarStar::__unserialize() accepts all-zero state in GH-21732
  • phar: restore is_link handler in phar_intercept_functions_shutdown in b77b50508b
  • phar: fix NULL dereference in Phar::webPhar() when SCRIPT_NAME is absent in 36c4195a2e
  • phar: free is_temp_dir entry before rejecting .phar/* paths in offsetGet in b9aaa05098
  • phar: call phar_entry_delref before goto finish in phar_add_file error paths in 0c99bd76b1
  • phar: propagate phar_stream_flush return value from phar_stream_close in 30f368567b

Ilija Tovilo

Jakub Zelenka

Jarne Clauw

  • ext/phar: Fix memory leak in phar_verify_signature() when md_ctx is invalid in 2fe85279a0

Jorg Sowa

  • ext/session: fix missing zval_ptr_dtor for retval in PS_GC_FUNC(user) in d96579371f

Jérôme Tamarelle

  • gen_stub: fix invalid C variable name for namespaced types in union/intersection type list in GH-21717

Marcos 'Marcão' Aurelio

  • Fix GH-21699: callable resolution must fail if error handler threw during self/parent/static deprecations in GH-21712

Máté Kocsis

  • Add support for generating enum pages for the manual in GH-21469

ndossche

  • Fix missing error propagation in openssl_x509_export_to_file() in 2004b709c4
  • Fix error check on X509V3_EXT_print() in 5684949337
  • openssl: Propagate PHP_OPENSSL_ASN1_INTEGER_set() failure in cea48b4781
  • Fix UB and error propagation when X509_gmtime_adj() fails in 2467dfb18f
  • Add missing error check on SSL_set_ex_data() in f81a9a2f7d
  • Fix const-generic warning in xp_ssl.c in 883014debb
  • openssl: Fix merge in c5fb035c67
  • Fix concurrent iteration and deletion issues in SplObjectStorage in 43a4f91c52
  • Upgrade Lexbor to v2.7.0 in 16baee5aaf

Niels Dossche

  • Fix memory leak regression in openssl_pbkdf2() in 880a6fcf8e
  • Fix NPD when i2d_PKCS12_bio is called on NULL bio in 23b151a2ca
  • Fix memory leak in check_cert() when X509_STORE_CTX_init() fails in eb6c48df6a
  • Fix crash in php_openssl_pkey_init_ec() when EVP_PKEY_CTX_new() fails in 6b16390a5a
  • Fix crash in openssl_digest() when EVP_MD_CTX_create() fails in b2f34721ab
  • Fix crash in openssl_pkey_export() when BIO_new() fails in d0d9183d9d
  • Fix crash in openssl_pkcs12_read() when BIO_new() fails in 5f9b6ed834
  • Fix crash in php_openssl_create_sni_server_ctx() when SSL_CTX_new() fails in 1ef9aa7e32
  • Fix memory leak on error path in openssl_open() in 20903a8485
  • Fix memory leaks when adding certificate to store fails in 4bb68c567f
  • Fix crash in openssl_pkey_get_details() when BIO_new() fails in e474d3c99f

Nora Dossche

  • Fix NULL deref when enabling TLS fails and the peer name needs to be reset in 7782b8876b
  • Fix build warning on LibreSSL in GH-21050
  • Fix SKIPIF of openssl_password.phpt in GH-20941
  • openssl: Fix missing error propagation in openssl_x509_export() in GH-21375
  • openssl: Fix error propagation in csr exports in GH-21403
  • Fix crash when ASN1_STRING_to_UTF8() fails in 8c11370974
  • Fix error check on X509_set_subject_name() in 8b031ea6ed
  • Fix memory leaks when php_openssl_dh_pub_from_priv() fails in 35e8cb87cb
  • Add missing error check on BN_CTX_new() in 4cffcbaf4a
  • Fix memory leaks when BN_bin2bn() fails in 7eb38cd3f5
  • Fix memory leaks and missing error propagation when php_openssl_csr_make() fails to set a version in 79b1ca2064

Peter Kokot

  • Remove redundant PHP manifest file in GH-21634

Pratik Bhujel

  • zend_inheritance: Fix enum case conflict in trait binding in GH-21771

Saki Takamachi

Shivam Mathur

  • Fix curl_setopt_ssl test for curl 8.19.0 in GH-21518
  • curl: add support for brotli and zstd on Windows in 0c6fc66848
  • Decrease zend.max_allowed_stack_size in stack_limit_015.phpt in cef6fbe64c
  • Accept HY000 in pdo_firebird autocommit test in GH-21789

Thomas Schiet

  • Fix GH-21683: PDOStatement::fetch() throws on empty result With PDO::ATTR_FETCH attribute in ec79850c50

Tim Düsterhus

vi3tL0u1s

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.