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.0beta2 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.5.0beta2
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.0beta2-x64NTS.zip (32.94 MiB)
php-8.5.0beta2-x86NTS.zip (29.44 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.0beta2-x64TS.zip (33.06 MiB)
php-8.5.0beta2-x86TS.zip (29.50 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.0beta2-cli-alpine
Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.5.0beta2-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.0beta2-fpm-alpine
Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.5.0beta2-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.0beta2-fpm
ChangeLog
Core
- Fixed bug GH-18850 (Repeated inclusion of file with
__halt_compiler
() triggers "Constant already defined" warning). - Fixed bug GH-19476 (pipe operator fails to correctly handle returning by reference).
- The report_memleaks INI directive has been deprecated.
- Constant redeclaration is deprecated and this behavior will trigger an error in PHP 9.
- Fixed OSS-Fuzz #439125710 (Pipe cannot be used in write context).
- Added support for configuring the URI parser for the FTP/FTPS as well as the SSL/TLS stream wrappers as described in https://wiki.php.net/rfc/url_parsing_api#plugability.
- Fixed bug GH-19548 (Shared memory violation on property inheritance).
- Fixed bug GH-19544 (GC treats
ZEND_WEAKREF_TAG_MAP
references as WeakMap references). - Introduced the TAILCALL VM, enabled by default when compiling with Clang>=19 on x86_64 or aarch64.
- Enacted the follow-up phase of the "Path to Saner Increment/Decrement operators" RFC, meaning that incrementing non-numeric strings is now deprecated.
- Various closure binding issues are now deprecated.
- Fixed bug GH-18373 (Don't substitute self/parent with anonymous class).
- Prohibit pipe & arrow function combination that leads to confusing parse trees.
- The disable_classes INI directive has been removed.
- The locally predefined variable $http_response_header is deprecated.
Filter
- Added support for configuring the URI parser for
FILTER_VALIDATE_URL
as described in https://wiki.php.net/rfc/url_parsing_api#plugability.
ODBC
- Remove ODBCVER and assume ODBC 3.5.
Opcache
- Fixed bug GH-19493 (JIT variable not stored before YIELD).
OpenSSL
- Implement #81724 (openssl_cms_encrypt only allows specific ciphers).
PDO
- Driver specific constants in the PDO class are now deprecated.
Phar
- Fixed memory leaks when verifying OpenSSL signature.
Session
- Added support for partitioned cookies.
SOAP
- Added support for configuring the URI parser for SoapClient::_doRequest() as described in https://wiki.php.net/rfc/url_parsing_api#plugability.
SPL
- Deprecate ArrayObject and ArrayIterator with objects.
Standard
- Fixed bug GH-16649 (UAF during
array_splice
). - Passing integers outside the interval [0, 255] to
chr()
is now deprecated. - Added support for partitioned cookies.
Tokenizer
- Fixed bug GH-19507 (Corrupted result after recursive tokenization during
token_get_all()
).
URI
- Clean up naming of internal API (header names, symbol names).
Commit List
Alexandre Daubois
- Add an enum for HASH_KEYIS* constants (GH-19376) in bf64dfcd99
- Fix GH-16649: Avoid UAF when using
array_splice
in c8774f9e61 - Fix GH-19476: pipe operator fails to correctly handle returning by reference (GH-19478) in 6009b8a100
- spl: Use
size_t
to storespl_heap
’s count in GH-19482 - Deprecate disabling
report_memleaks
INI directive in GH-19481 - [RFC] Deprecate constant redeclaration in GH-19474
- Remove
report_memleaks
entry from php.ini-* in GH-19502 - Fix GH-19548: remove
ZEND_ACC_OVERRIDE
on property inheritance only if it's not part of shared memory in 595abeef3f - [RFC] Deprecate closure binding issues in GH-19510
Arjen de Korte
- Fix GH-19021: deprecation for tidyOptIsReadOnly in a97717d23e
Arnaud Le Blanc
- Fit JIT variable not stored before YIELD in bc05bfe7c5
- Differenciate WeakMaps from bare HashTables used as weak maps for GC purposes in d74901ae1a
- TAILCALL VM in 73b98a3858
- Deprecate driver specific PDO constants in 6f32e1c690
Calvin Buckley
- Remove references to ODBCVER and assume ODBC 3.x in GH-19453
Daniel Scherzer
- NEWS/UPGRADING for ArrayObject and ArrayIterator with objects deprecation in dbf0102b15
- [RFC] Add
#[\DelayedTargetValidation]
attribute in GH-18817 ext/hash
: Add #[\Deprecated] to MHASH_* constants in GH-19565ext/session
: Add #[\Deprecated] to SID constant in GH-19566ext/reflection
: Align return types and values in GH-19567ext/intl
: Add #[\Deprecated] to U_MULTIPLE_DECIMAL_SEPERATORS constant in GH-19564- [RFC]
FILTER_THROW_ON_FAILURE
in GH-18896 - Update versions for PHP 8.5.0beta2 in d6c16c617b
David CARLIER
- ci: enable _GLIBCXX_ASSERTIONS c++ flags on debug builds. in GH-19497
zend_memrchr
using standard preprocessor id for x86 instead. in GH-19491- zend: optimisation for
zend_get_page_size
for macos. in GH-19494
Derick Rethans
- Fix deprecation warning in 4d64e605f9
- Add missing definition in 7cf14848da
- Add
ZEND_VM_KIND
constant in 5cf4861f7f - Change script to define '
ZEND_VM_GEN_KIND
' instead of 'ZEND_VM_KIND
' for internal usage in 7382895c22
Dmitry Stogov
- Eliminate useless spill stores in GH-19467
- Added test for PR GH-19458 in cbb9ee8f5b
Gina Peter Banyard
ext/spl
: Deprecate ArrayObject and ArrayIterator with objects in GH-19420ext/standard
: Deprecate passing integers outside the interval [0, 255] tochr()
in GH-19441- Update NEWS and UPGRADING for
chr()
deprecation in f9d95c649e - main: refactor userstream method calling in 0992265611
- main: Add bailout tests for dir opening on user stream in 1c67b060c4
- main: drop unnecessary zend_{try|catch} in user stream open wrapper in 4d3ccc21d0
ext/phar
: Fix memory leaks when verifying OpenSSL signature in GH-19563- Enact follow-up phase of the "Path to Saner Increment/Decrement operators" RFC in GH-19374
- Update NEWS/UPGRADING for ++ on string deprecation in f041c13c94
- Clarify usage of @deprecated annotation in stubs in fb27ff958c
- Normalize version number strings in 9b27fdbe52
- Zend: Move coercion related tests into a subfolder in e20095a2cf
- core: Remove disable_classes INI setting in f4e2e91d4b
- Update NEWS/UPGRADING for disable_classes removal in 1c1f08c282
- Core changes should be first and then other extension are alphabetical in e87767686c
ext/standard
: Deprecate $http_response_header in GH-19464- Update NEWS/UPGRADING for $http_response_header deprecation in 99068da2b1
Ilija Tovilo
- Fix "Constant already defined" warning with repeated inclusion of file with
__halt_compiler
() in a3de2ce9ba - Fix signed int overflow in scanner in 0a12aaa5b8
- Don't substitute self/parent with anonymous class in 6497c6c455
- Prohibit pipe & arrow function combination that leads to confusing parse trees in 71a3226a46
Jakub Zelenka
- Fix #81724: openssl_cms_encrypt only allows specific ciphers in 20c8c12d9e
- Fix GH-19245: Success error message on TLS stream accept failure in 2b415e416e
Jorg Adam Sowa
Kuba Werłos
- Fix corrupted result after recursive tokenization during
token_get_all()
in 94d0b41db1 - Remove redundant
PARSER_MODE()
call in GH-19559
Mark Karpeles
- Fix GH-19484 i: potential use after free when using persistent pgsql connections in 987a3a5c8e
Máté Kocsis
- Update real-time benchmark config in 96990f451d
- Fix fallback value handling in the real-time benchmark in cf33fd70ad
- Add internal URI handling API in GH-19073
ext/uri
: Use the term "URI parser" instead of "URI handler" in GH-19530
Niels Dossche
- Remove dead error checks for
php_stream_filter_alloc()
in GH-19194 - partitioned option for setcookie/setrawcookie and sessions in 1bba07ecc0
- Realign entries in dcd3ef33b3
- Fix OSS-Fuzz #439125710: Pipe cannot be used in write context in c98b173430
- Update lexbor to lexbor/lexbor@b46db664 in e976926843
- Sync lexbor with master on PHP 8.4 in c66af62511
- Fix Windows build in 3690df022b
Tim Düsterhus
- Update GitHub Action workflows to
actions/checkout@v5
in 2650248a92 - gen_stub: Update to PHP-Parser 5.6.1 in GH-19495
- uri: Fix header guard constant name for
uri_parser_*.h
in GH-19539 - uri: Improve return type of
uriparser_parse_uri_ex()
in GH-19540 - uri: Use
PHP_RINIT
/SHUTDOWN_FUNCTION in uri_parser_whatwg in GH-19541 - NEWS for d74901ae in 96c0bc55bb
- uri: Mark local pointers as
const
in URI parser implementations in GH-19581 - uri: Properly prefix symbols in uriparser*.[ch] in GH-19554
- uri: Clean up
uri_parser_rfc3986.c
in GH-19586
Timo Tijhof
- README: Fix non-existent
iconv
in macOS instruction in GH-19475
Tim Starling
- Add some comments to
zend_gc.c
in 38b9c336ba