PHP 8.5.0beta2: Downloads, Changelog, News

Release Information

Release
8.5.0beta2
PHP Version
PHP 8.5
Release Date
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 (./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.
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.

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

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

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 store spl_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

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-19565
  • ext/session: Add #[\Deprecated] to SID constant in GH-19566
  • ext/reflection: Align return types and values in GH-19567
  • ext/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

Gina Peter Banyard

  • ext/spl: Deprecate ArrayObject and ArrayIterator with objects in GH-19420
  • ext/standard: Deprecate passing integers outside the interval [0, 255] to chr() 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

Jorg Adam Sowa

  • Updated codecov-action to v5 in GH-19517
  • remove safe_mode leftovers in GH-19552

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

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.