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.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.2 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.5.2How 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.
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.2-x64NTS.zip
Size: 33.32 MiB SHA256:
acb844830aee008a7dde4092f6aab62b09541b3f16260806beff4e4dcc7d9617 php-8.5.2-x86NTS.zip
Size: 29.8 MiB SHA256:
6d52684520ef79421f678c8d70792bfe746df31e0b76224ac39d3107f5f89daa 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.2-x64TS.zip
Size: 33.45 MiB SHA256:
a44bda6ae67fe20cb5da8d38d228601d48459f857d95b54251d12365bd428dfe php-8.5.2-x86TS.zip
Size: 29.85 MiB SHA256:
7fd2816819165b3504275140e040e13e7f55e1f146641188257715d063eeeecf 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.5.2-cli-alpineDebian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.5.2-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.5.2-fpm-alpineDebian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.5.2-apacheDebian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.5.2-fpmChangeLog
Core
- Fix OSS-Fuzz #465488618 (Wrong assumptions when dumping function signature with dynamic class const lookup default argument).
- Fixed bug GH-20695 (Assertion failure in
normalize_value()when parsing malformed INI input viaparse_ini_string()). - Fixed bug GH-20714 (Uncatchable exception thrown in generator).
- Fixed bug GH-20352 (UAF in
php_output_handler_freevia re-entrantob_start()during error deactivation). - Fixed bug GH-20745 ("Casting out of range floats to int" applies to strings).
DOM
- Fixed bug GH-20722 (Null pointer dereference in DOM namespace node cloning via clone on malformed objects).
- Fixed bug GH-20444 (Dom\XMLDocument::C14N() seems broken compared to DOMDocument::C14N()).
EXIF
- Fixed bug GH-20631 (Integer underflow in exif HEIF parsing when pos.size < 2).
Intl
- Fix leak in
umsg_format_helper().
LDAP
- Fix memory leak in
ldap_set_options().
Lexbor
- Fixed bug GH-20668 (`Uri\WhatWg\Url::withHost()` crashes (SEGV) for URLs using the file: scheme).
Mbstring
- Fixed bug GH-20674 (
mb_decode_mimeheaderdoes not handle separator).
OpenSSL
- Fixed bug GH-20802 (undefined behavior with invalid SNI_server_certs options).
PCNTL
- Fixed bug with
pcntl_getcpuaffinity()on solaris regarding invalid process ids handling.
Phar
- Fixed bug GH-20732 (Phar::LoadPhar undefined behavior when reading fails).
- Fix
SplFileInfo::openFile()in write mode. - Fix build on legacy OpenSSL 1.1.0 systems.
- Fixed bug #74154 (Phar extractTo creates empty files).
Session
- Fix support for MM module.
Sqlite3
- Fixed bug GH-20699 (SQLite3Result fetchArray return array|false, null returned).
Standard
- Fix error check for
proc_open()command. - Fix memory leak in
mail()when header key is numeric. - Fixed bug GH-20582 (Heap Buffer Overflow in iptcembed).
URI
- Fixed bug GH-20771 (Assertion failure when getUnicodeHost() returns empty string).
Zlib
- Fix OOB
gzseek()causing assertion failure.
Commit List
Alexandre Daubois
Arnaud Le Blanc
- Fix
zend_vm_gen.phpwhen executed with PHP 8.5 in d3ef80649e
Bob Weinand
Calvin Buckley
- Fix
skipiffor mkfifo usage ingh20582.phptin GH-20804
Daniel Scherzer
- Update versions for PHP 8.5.2 in ea75635f1d
David Carlier
- Fix GH-20603 issue on windows 32 bits in ff51ac161d
- Fix GH-20622: imagestring/imagestringup overflow/underflow in 9f654decdc
ext/gd: fix build in e910bbf144- Fix GH-20620:
bzcompress()overflow on large source size in 1f1147a666 - Fix GH-20678: resource created by GlobIterator crashes with
fclose()in 97a90f4361 ext/posix: (Further) fix groups array creation on macos in e63dae2941ext/pcntl: fixpcntl_getcpuaffinity()for solaris in 5faa54d93b
Dmitry Stogov
- Update IR in GH-20710
Gina Peter Banyard
- Fix GH-20553:
PDO::FETCH_CLASSTYPEignores $constructorArgs in PHP 8.5.0 in a3454b80e6 ext/standard: Fix memory leak inmail()when header key is numeric in 20f9772063
Giovanni Giacobbi
- Use EVP_MD_CTX_destroy() instead of EVP_MD_CTX_free() for compatibility and consistency in f89a3503bf
- gen_stub: Fix php-parser package download in GH-20775
Ilija Tovilo
- Suppress libxml deprecations in f7fb13eb07
- Fix yet another xml deprecation in fe070fcc75
- Fix warning on 8.5 in f39ae2fc67
- Fix dumping function signature with dynamic class const lookup default argument in 26c0cbd93c
- Update clang in macOS build in cb413b5d5f
- Fix xcode-select in 6cdb8bf0a2
- Fix curl protocols test expectation in 06b8b75d2e
- Fix uncatchable exception thrown in generator in fb1ec9a5a7
Jakub Zelenka
- Fix GHSA-8xr5-qppj-gvwj: PDO quoting result null deref in 727a4ddc39
- Update NEWS with info about security issues in c48a9f42d3
Kamil Tekiela
- Squashed commit of the following: in dbf56e0eba
Linus Groh
- opcache: Remove unused sys/ipc.h include from ZendAccelerator.c in GH-20662
Max Kellermann
- sapi/fpm: remove use of variable-length arrays in GH-10645
Michael Orlitzky
ext/session/mod_mm.c: add a few missing ZSTR macros in 0eb6a4d32f
Michael Telgmann
- fix: Allow variadic syntax in PHPDoc parameter annotation in
gen_stub.phpin GH-20342
Niels Dossche
- dom: Fix compile warning due to misplaced const cast in bd67ba66a8
- Fix deprecation warning for libxml SAX header in GH-18594
- xml: Backport more deprecation fixes in dd2179433c
- Tweak values for test on Windows in GH-20633
- dom: Backport test for libxml changes in 688902d455
- intl: Fix tests for icu update in 2b04e0831a
- xml: Fix deprecation properly by backporting the modern-but-actually-old implementation in d635c8788b
- ldap: Fix memory leak in
ldap_set_options()in 02a7c49564 - standard: Fix error check for
proc_open()command in 038e53420b - Fix test for 8.5+ in 526938648e
- Fix GH-20699: SQLite3Result fetchArray return array|false, null returned in acd0898bdf
- Make
bug70417.phptless flaky in 2bf2411976 - Fix GH-20695: Assertion failure in
normalize_value()when parsing malformed INI input viaparse_ini_string()in 85cb6e421a - Fix GH-20584: Information Leak of Memory in c5f28c7cf0
- Fix GHSA-h96m-rvf9-jgm2 in 8b801151bd
- Fix GHSA-www2-q4fc-65wf in ed70b1ea43
- Fix GH-20722: Null pointer dereference in DOM namespace node cloning via clone on malformed objects in 983be089c0
- Fix GH-20352: UAF in
php_output_handler_freevia re-entrantob_start()during error deactivation in ee0143887d - Fix GH-20732: Phar::LoadPhar undefined behavior when loading directory in 22aaa20dab
- phar: Fix
SplFileInfo::openFile()in write mode in efde160ef4 - intl: Fix leak in
umsg_format_helper()in 9a7c09c963 - Fix bug #74154: Phar extractTo creates empty files in e90b48c8e5
- Fix GH-20771: Assertion failure when getUnicodeHost() returns empty string in 13d63d6105
- Fix NEWS formatting in 494dd97521
- Fix GH-20444: Dom\XMLDocument::C14N() seems broken compared to DOMDocument::C14N() in 40c291cf93
- Fix GH-20582: Heap Buffer Overflow in iptcembed in 99ed66b49f
- Fix OOB
gzseek()causing assertion failure in 2709ebc0ce - Fix zlib test for 8.5+ in 6e733a2bd0
- Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird in GH-20790
- Fix GH-19962: arrayIndexThenCheck static analysis warning in firebird in bae78c614a
Oblivionsage
- Fix GH-20631: Integer underflow in exif HEIF parsing in 6a0da6dc2e
Remi Collet
- Fix header for uriBaseRuntimeVersionA prototype in e35fefbfdb
- Fix missing liburiparser linker option in 872ff820cb
Sharad Chandran R
- Fix variable assignment for PHP argument escaping in
run-tests.phpin GH-20799
Takuya Aramaki
- Fix TypeError message of
setlocale()in GH-20625
Tim Düsterhus
- uri: Update to uriparser-0.9.9-79-gf47a7f0 in GH-20671
- lexbor: Cherry pick "URL: fixed "heap-buffer-overflow" for scheme is "file"." in 3e7710c97d
- uri: Update to uriparser-0.9.9-85-g9a31011 in GH-20707
- uri: Update to uriparser-1.0.0 in GH-20715
- Update GitHub Action workflows to
actions/checkout@v6in bb70c5589a - Update GitHub Action workflows to
actions/cache@v5in 6f61244a03 - Update GitHub Action workflows to
actions/checkout@v6(8.2) in 61c35928fa - Update GitHub Action workflows to
actions/checkout@v6(8.3) in 7c1830b056 - Update GitHub Action workflows to
actions/checkout@v6(8.4) in 302aed78ee - Update GitHub Action workflows to
actions/labeler@v6in 034ee3f47b - Update GitHub Action workflows to
actions/upload-artifact@v6in eb1c0177fd - Update GitHub Action workflows to
actions/checkout@v6(8.5) in 872c9bd41d - Update GitHub Action workflows to
actions/upload-artifact@v6(8.5) in 874727b41f
Yuya Hamada
- Fix GH-20674
mb_decode_mimeheaderdoes not handle separator in 0056d013bf