Release Information
- Release Type
- Bug Fix Release
- Release Status
- QA Release Latest
- Branch Status
- Upcoming Release
PHP 8.5 is a development version, and is not recommended for production use. PHP 8.5 is scheduled to reach General Availability on 2025-11-20. This is the latest QA release in the series.
Downloads
Source Code
Git Clone
Use Git to clone the 8.5.0beta3 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.5.0beta3
How 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.0beta3-x64NTS.zip (32.95 MiB)
php-8.5.0beta3-x86NTS.zip (29.41 MiB)
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.0beta3-x64TS.zip (33.08 MiB)
php-8.5.0beta3-x86TS.zip (29.47 MiB)
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.0beta3-cli-alpine
Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.5.0beta3-cli
PHP 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.0beta3-fpm-alpine
Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.5.0beta3-apache
Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.5.0beta3-fpm
ChangeLog
Core
- Destructing non-array values (other than NULL) using [] or
list()
now emits a warning. - Fixed bug GH-19637 (Incorrect Closure scope for FCC in constant expression).
- Fixed bug GH-19613 (Stale array iterator pointer).
- Fixed bug GH-19679 (
zend_ssa_range_widening
may fail to converge). - Using null as an array offset or when calling
array_key_exists()
is now deprecated. - Fixed bug GH-19681 (
PHP_EXPAND_PATH
broken with bash 5.3.0). - Marks the stack as non-executable on Haiku.
- Deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string is now deprecated.
CLI
- Fixed bug GH-19461 (Improve error message on listening error with IPv6 address).
Date
- Fixed
date_sunrise()
anddate_sunset()
with partial-hour UTC offset.
EXIF
- Added support to retrieve Exif from HEIF file.
FPM
- Fixed failed debug assertion when
php_admin_value
setting fails.
Filter
- Fixed bug GH-16993 (filter_var_array with FILTER_VALIDATE_INT|
FILTER_NULL_ON_FAILURE
should emit warning for invalid filter usage).
Intl
- Added
grapheme_strpos()
,grapheme_stripos()
,grapheme_strrpos()
,grapheme_strripos()
,grapheme_strstr()
,grapheme_stristr()
andgrapheme_levenshtein()
functions add$locale
parameter - Fixed bug GH-11952 (Fix locale strings canonicalization for IntlDateFormatter and NumberFormatter).
ODBC
- Removed driver-specific build flags and support.
Opcache
- Fixed bug GH-19486 (Incorrect opline after deoptimization).
- Fixed bug GH-19601 (Wrong JIT stack setup on aarch64/clang).
- Fixed bug GH-19388 (Broken
opcache.h
uge_code_pages). - Fixed bug GH-19657 (Build fails on non-glibc/musl/freebsd/macos/win platforms).
PCRE
- Upgraded to pcre2lib from 10.45 to 10.46.
PDO
- Driver specific methods in the PDO class are now deprecated.
PDO_SQLITE
- Add PDO`Sqlite::ATTR_TRANSACTION_MODE` connection attribute.
Reflection
- Fix GH-19691 (getModifierNames() not reporting asymmetric visibility).
Session
- Fix RC violation of session SID constant deprecation attribute.
Standard
- Fix GH-19610 (Deprecation warnings in functions taking as argument).
- Fixed bug GH-19577 (Avoid integer overflow when using a small offset and
PHP_INT_MAX
with LimitIterator). - Implement GH-19188: Add support for new INI
mail.c
r_lf_mode.
Streams
- Fixed bug GH-14506 (Closing a userspace stream inside a userspace handler causes heap corruption).
- Avoid double conversion to string in
php_userstreamop_readdir()
.
URI
- Added support for Uri\Rfc3986\Uri::
with*()
methods. - Fixed memory management of Uri\WhatWg\Url objects.
- Fixed memory management of the internal "parse_url" URI parser.
- Fixed double-free when assigning to
$errors
fails when using the Uri\WhatWg\Url parser. - Reject out-of-range ports when using the Uri\Rfc3986\Uri parser.
- Return null instead of 0 for Uri\Rfc3986`Uri::getPort()` when the URI contains an empty port.
- Fixed creation of the InvalidUrlException when not passing an errors zval to the internal whatwg parser.
- Clean up naming of internal API.
Commit List
Alexandre Daubois
- Remove mentions of PHP 9.0 in 1c664e1c74
- core: Deprecate using
null
as an array offset and when callingarray_key_exists()
in GH-19511 - Fix GH-19577: avoid integer overflow when using a small offset and
PHP_INT_MAX
with LimitIterator in GH-19585 - Add NEWS missing entry in f0c531597c
- Avoid using unsafe
sprintf()
in GH-19598 - Fix GH-19461: Improve error message on listening error with IPv6 in GH-19462
- Fix NEWS entry order in 0e668e517a
- Fix GH-19188: Add support for new INI
mail.cr_lf_mode
in GH-19238 - Fix GH-16993: Fix filter_var_array to warn when validation filters are incorrectly combined with
FILTER_NULL_ON_FAILURE
flag in GH-19660 - Fix GH-11952: better locale strings canonicalization for IntlDateFormatter and NumberFormatter in GH-19593
- Reorder intl NEWS entry in 124540a29c
- Fix intl tests naming in GH-19763
- Fix memory leak when providing an invalid locale to IntlDateFormatter in GH-19764
- Use
zend_string
API formail.c
r_lf_mode validation in GH-19759
Arnaud Le Blanc
- Fix incorrect opline after deoptimization in 0fe24447bc
- Move NEWS entry in dee0042502
- Fix JIT stack setup on aarch64/clang in 95d52d52da
- Fix
opcache.h
uge_code_pages in 0ee7732c01 - Deprecate driver specific PDO methods in a4afc57f1d
- Fix ZTS+JIT build on non-glibc/musl/freebsd/macos/win platforms in 3625cbb344
- Ensure that type widening converges in bd88a54934
benstone
- Add support for retrieving Exif from HEIF file in 7d5c8dad3b
Calvin Buckley
- Remove driver specific support from ODBC in GH-15727
Danack
- Check if the macro AC_PROG_CC_C99 actually made the compiler accept C99 code. in GH-6317
Daniel Scherzer
- gen_stub: Infer constants' types from values in GH-19568
- GH-19691: Add asymmetric visibility to
Reflection::getModifierNames()
in GH-19697 - [RFC] Allow
#[\Deprecated]
on traits in GH-19045
David Carlier
- fix build warnings for Haiku in 2a96af743e
- Fix GH-19578: imagefilledellipse underflow on width argument in 93865a4086
David CARLIER
ext/pdo_pgsql
: [RFC] Deprecate PGSQLTRANSACTION constants. in GH-19594
Derick Rethans
- Write up NEWS rules in GH-19387
- Improve accuracy of ext_stmt emits during pipe operations in d85662d6cc
Dmitry Stogov
- Update IR in 93740d0a82
- Cleanup SSA(s) in case of fatal error during tracing JIT in d59ae9345c
George Wang
- fix pipe detection for STDERR in aa3983b31b
- update LiteSpeed API to V8.3 in ebbed484fb
Gina Peter Banyard
ext/opcache
: Add missing INI setting in test in 5d5ef5050aext/standard
: Fix GH-19610 (Deprecation warnings in functions taking as argument) in GH-19611- Zend: Warn when destructuring non-array values in GH-19439
- Update NEWS/UPGRADING for destructing non-array values in 34a0bcf103
- sapi/fuzzer: Fix disabling of InfiniteIterator in GH-19668
- Update NEWS and UPGRADING with entry for null as array offset in a13dc047ac
Ilija Tovilo
- Fix RC violation of session SID constant deprecation attribute in b7d66189cb
- Fix
glob()
RC info in a544fe107e - Use ull integer suffix for bitwise logic (GH-19673) in 8a4cbde8c7
- Fix
date_sunrise()
anddate_sunset()
with partial-hour UTC offset in 0ae9a58ade - Fix RC assertion in fpm when
php_admin_value
setting fails in 15beb140e5 - Stale array iterator pointer in f9ce6d8f3a
Jakub Zelenka
- Use the default OpenSSL version for MacOS to match libs in 6194084837
Joe Watkins
- Revert "Remove include "sanity check" to get better error (#19650)" in cb9af8d532
Jorg Adam Sowa
ext/mbstring
: Useinternal_encoding
INI setting instead ofmb_internal_encoding()
in tests in GH-19663
Marc Bennewitz
- Mysqlnd: Removed useless precompilter cond in GH-19120
Máté Kocsis
Niels Dossche
- Update pcre2lib from 10.45 to 10.46 in GH-19618
- Use RETURN_EMPTY_ARRAY() on empty glob returns in GH-19642
- Fix GH-19612: Mitigate libxml2 tree dictionary bug in 080fd14458
- Fix disabling of InfiniteIterator in fuzzer in GH-19690
- Fix GH-14506: Closing a userspace stream inside a userspace handler causes heap corruption in 4b99519eaa
- Remove incorrect call to
zval_ptr_dtor()
inuser_wrapper_metadata()
in d10ff9bbd8 - Avoid double conversion to string in
php_userstreamop_readdir()
in d0630e850b - Fix memory leak in zip when encountering empty glob result in 216e87ad7e
- Fix GH-19720: Assertion failure when error handler throws when accessing a deprecated constant in 9d69ab91ab
- Fix GH-19706: dba stream resource mismanagement in f744c827a8
- Fix memory leak in phar tar temporary file error handling code in 2f162214e8
- Remove pointless
zval_ptr_dtor()
calls in userspace stream handling in GH-19712 - Fix metadata leak when phar convert logic fails in c50b37d231
- Fix memory leak on failure in
phar_convert_to_other()
in 98bb934685 - Fix OSS-Fuzz #385993744 in ff84cb08ef
- Fix GH-19752: Phar decompression with invalid extension can cause UAF in f6878b6ccf
Nikita Popov
- Remove include "sanity check" to get better error in GH-19650
Remi Collet
- Fix GH-19681
PHP_EXPAND_PATH
broken with bash 5.3.0 in 98d2b92324 - NEWS in abbf84083a
- NEWS in 4ee90ea275
- NEWS in 5d2cf26c87
- allow to build with system liburiparser in GH-18886
Samuel Štancl
tekimen
- [RFC] Add a locale for grapheme case-insensitive functions in GH-18792
Tim Düsterhus
- uri/standard: Move the
parse_url()
URI parser into ext/uri/ in GH-19587 zend_weakrefs
: Remove layer of indirection inzend_weakrefs_hash_clean()
in GH-19580- uri: Stop touching the
lxb_url_parser_t.idna
field in GH-19592 - uri: Fix lexbor memory management in
uri_parser_whatwg.c
in GH-19591 - uri: Fix normalization memory management for
uri_parser_php_parse_url.c
in GH-19600 - NEWS for recent
ext/uri
changes (GH-19587, GH-19591, GH-19600) in e844e68af8 - main: Change the
register_argc_argv
INI default toOff
in GH-19473 - random: Use
->default_object_handlers
for engines in GH-19625 zend_ast
: Markzend_ast_list_add()
asZEND_ATTRIBUTE_NODISCARD
in GH-19632- Optimizer/
zend_dump
: Fix printing of the exception table in GH-19634 - uri: Always use
const
pointers when referring touri_parser_t
in GH-19623 - uri: Use
has_text_range()
inphp_uri_parser_rfc3986_scheme_read()
in GH-19621 - uri: Fix memory safety violations when assigning
$errors
by reference fails in GH-19628 - github/labeler.yml: Add “ABI break” label for
ext/uri
header changes in 22252b03fe - uri: Remove useless
uri_property_handlers_t
struct in GH-19622 - uri: Retrieve “raw” representation for
->getPort()
in GH-19646 - opcache: Improve error messages when “temporarily enabling OPcache” in GH-19619
- uri: Reject ports overflowing
zend_long
for uri_parser_rfc3986 in GH-19644 - Fix organization of UPGRADING.INTERNALS in GH-19635
zend_ast
: Fix Closure scope for FCC in constant expression in GH-19639- fpm: Improve the error message when FPM is running as root in GH-19695
- uri: Stop accessing a private header to retrieve the uriparser version in GH-19678
- uri: Show the uriparser runtime version in PHPInfo in GH-19718
- uri: Fix handling of empty ports for uri_parser_rfc3986 in GH-19645
- uri: Call the proper
clone_obj
handler inuri_write_component_ex()
in GH-19649 - uri: Do not copy the normalized URI when cloning RFC 3986 URIs in GH-19588
- uri: Improve safety of URI object initialization in GH-19648
- uri: Fix handling of the
errors == NULL && !silent
for uri_parser_whatwg in GH-19748 - uri: Make the
.free_uri
handlers safe to call withNULL
in GH-19627 - main: Deprecate deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string in GH-19606
Volker Dusch
- Update versions for PHP 8.5.0beta3 in 03c9d2303e