PHP 8.5.0beta1: Downloads, Changelog, News

Release Information

Release
8.5.0beta1
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.0beta1 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.5.0beta1
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.0beta1-cli-alpine

Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.5.0beta1-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.0beta1-fpm-alpine

Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.5.0beta1-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.0beta1-fpm

ChangeLog

Core

  • Non-canonical cast names (boolean), (integer), (double), and (binary) have been deprecated.
  • The $exclude_disabled parameter of the get_defined_functions() function has been deprecated, as it no longer has any effect since PHP 8.0.
  • Terminating case statements with a semicolon instead of a colon has been deprecated.
  • The backtick operator as an alias for shell_exec() has been deprecated.
  • Returning null from __debugInfo() has been deprecated.
  • Support #[\Override] on properties.

Curl

  • The curl_close() function has been deprecated.
  • The curl_share_close() function has been deprecated.

Date

  • The DATE_RFC7231 and DateTimeInterface::RFC7231 constants have been deprecated.

DOM

  • Fixed bug GH-18877 (\Dom\HTMLDocument querySelectorAll selecting only the first when using ~ and :has).

FileInfo

  • The finfo_close() function has been deprecated.
  • The $context parameter of the finfo_buffer() function has been deprecated as it is ignored.

GD

  • The imagedestroy() function has been deprecated.

Intl

  • Intl's internal error mechanism has been modernized so that it indicates more accurately which call site caused what error. Moreover, some ext/date exceptions have been wrapped inside a IntlException now.
  • The intl.error_level INI setting has been deprecated.

MySQLi

  • The mysqli_execute() alias function has been deprecated.

OpenSSL

  • Fixed bug GH-19369 (8.5 | Regression in openssl_sign() - support for alias algorithms appears to be broken).
  • The $key_length parameter for openssl_pkey_derive() has been deprecated.
  • Implement #80495 (Enable to set padding in openssl_(sign|verify).
  • Implement #47728 (openssl_pkcs7_sign ignores new openssl flags).

PDO

  • The "uri:" DSN scheme has been deprecated due to security concerns with DSNs coming from remote URIs.

Reflection

  • Fixed bug GH-17927 (Reflection: have some indication of property hooks in _property_string()).
  • The setAccessible() methods of various Reflection objects have been deprecated, as those no longer have an effect.
  • ReflectionClass::getConstant() for constants that do not exist has been deprecated.
  • ReflectionProperty::getDefaultValue() for properties without default values has been deprecated.

SPL

  • Unregistering all autoloaders by passing the spl_autoload_call() function as a callback argument to spl_autoload_unregister() has been deprecated. Instead if this is needed, one should iterate over the return value of spl_autoload_functions() and call spl_autoload_unregister() on each value.
  • The SplObjectStorage::contains(), SplObjectStorage::attach(), and SplObjectStorage::detach() methods have been deprecated in favour of SplObjectStorage::offsetExists(), SplObjectStorage::offsetSet(), and SplObjectStorage::offsetUnset() respectively.

Standard

  • The socket_set_timeout() alias function has been deprecated.
  • Passing null to to readdir(), rewinddir(), and closedir() to use the last opened directory has been deprecated.
  • Fixed bug GH-19153 (#[\Attribute] validation should error on trait/interface/enum/abstract class).

XML

  • The xml_parser_free() function has been deprecated.

Commit List

Alexandre Daubois

  • Rename poorly named tests in Zend/tests in GH-19332
  • Fix GH-18404: Display diff when a single test is run (GH-19400) in 9673079903
  • Make spl_filesystem_dir_read() return void in GH-19419
  • Use proper hash_spec_result enum for return values in ext/hash in GH-19386
  • Various return types and values consolidation in GH-19418

Arnaud Le Blanc

Arndt Kaiser

  • Fix filtering of INI directives to respect leading whitespaces in 9d29283392

Calvin Buckley

  • Add SAPI_HEADER_DELETE_PREFIX, make ext/session use it in GH-18678

Christoph M. Becker

Daniel Scherzer

  • ext/standard/tests/file/bug81145.phpt: unlink file before exit in GH-19293
  • AllowDynamicProperties: use fully qualified name in validation errors in GH-19296
  • GH-17927: Indicate virtual properties and hooks in reflection output in GH-19297
  • NEWS/UPGRADING: fix missing __ in __toString() in 6f630a882d
  • GH-19153: Validate #[\Attribute] targets in GH-19154
  • UPGRADING: document #[\Attribute] validation from GH-19154 in 6280dfc025
  • [RFC] Deprecate returning null from __debugInfo() in GH-19455
  • [RFC] Deprecate xml_parser_free() in GH-19449
  • [RFC] Deprecate curl_close() in GH-19451
  • [RFC] Deprecate curl_share_close() in GH-19452
  • [RFC] Deprecate imagedestroy() in GH-19454
  • [RFC] Deprecate ReflectionClass::getConstant() for missing constants in GH-19456
  • [RFC] Deprecate ReflectionProperty::getDefaultValue() without default in GH-19457
  • NEWS/UPGRADING for recent deprecations in c3bee21256

David CARLIER

  • Fixed GH-19163 fix ext/intl build on midly older compilers but still supporting C++11. in GH-19353
  • Fixed GH-19381: posix_kill_pidoverflow test depends on pcntl too. in GH-19382
  • ext/intl: update from C to C++ step2. in GH-19294
  • ext/int: IntlTimeZone converting few intl error to exceptions. in GH-13477

David Carlier

  • zend call stack fixing stack limit for macOs arm64 in bd2766ce79

Derick Rethans

  • Setting TEST_PHP_EXECUTABLE hasn't been necessary for ages in 0c82801384
  • Add a brief section on options to the test runner, and -j in a9ab62d54d
  • Emit EXT_STMT after each pipe stage, and attach the TMP var that holds the intermediary result in GH-19377

Dmitry Stogov

  • Update IR in ac1cd9c26e
  • Fix Nightly workflow Symfony assertion (ir_ra.c:326: ir_fix_live_range: Assertion `ival && p->start == old_start' failed) in GH-19458

Florian Engelhardt

  • Reset global pointers to prevent use-after-free in 3aaa8d3526

Frederik Milling Pytlick

Gina Peter Banyard

  • Zend/zend_exceptions: Add const modifiers in c9e91bfbab
  • Zend: Exception::__toString() no need to allocate the method name in a95a81000d
  • ext/zend_test: Test zend_call_method_if_exists() in fc6c49cbf4
  • Zend: refactor zend_call_method_if_exists() API in 7bac9de94a
  • ext/intl: Refactor error handling in GH-19196
  • main/streams/transports.c: remove useless cast in GH-19330
  • main: pack _php_netstream_data_t and use bool instead of int type in GH-19331
  • ext/standard/proc_open.c: Minor refactorings in GH-18085
  • ext/odbc: various minor refactorings in GH-19337
  • tree: use zend_str_has_nul_byte() API in GH-19336
  • main: refactor implementation of set_time_limit() in GH-19338
  • main/php_ini: various minor refactorings in GH-19339
  • streams: add const specifier in 17b8706bf6
  • streams: reduce scope of variables in b35dbe474e
  • streams: use type bool instead of type int in b3551cc31f
  • streams: use type zend_result instead of type int in 841afdc486
  • streams: use type size_t instead of type unsigned int in c9836b03ce
  • streams: use int type instead of long in 67d6160462
  • streams: use precomputed persistant variable in 02af9acfca
  • streams: remove confusing step variable in 4b6ebcc6e9
  • streams: use -1 directly instead of FAILURE macro in fb2585f4e2
  • streams: use call in if statement directly in 0d0f774a6a
  • streams: remove useless casts in c50a715a5c
  • streams: refactor implementation of stream_select() in b46c5e6186
  • streams: use RETURN_BOOL() when possible in cd13ba73e2
  • streams: voidify php_stream_filter_prepend_ex() in fa85b38560
  • streams: drop unused includes in 93ec0ac0f3
  • streams: use an enum for return type of _php_stream_make_seekable() in 051414bec6
  • streams: use %zu printf specifier for size_t in a02b2b8eb6
  • streams: use type php_socket_t instead of type int in 9e334af6e4
  • streams: refactor statbuf_from_array() in 4d5bdef21a
  • Zend/zend_ast: Add const qualifier in 36ec3370fb
  • Zend/zend_ast: Use zend_ast_get_list() instead of cast in 8512514a0f
  • Zend/zend_ast: Use uint32_t type instead of int type in d0274e74f8
  • tree: replace some unnecessary uses of spprintf in GH-19354
  • ext/json: Various small refactorings in 17328ef86b
  • ext/json: Refactor php_json_encode_array() in 5b3d0e4c09
  • tree: drop non canonical casts and ZPP tests in 1e0c8baf05
  • ext/ldap: Remove unused include statement in 2e53aef1e8
  • ext/ldap: Add static specifier for private function in 1c820750da
  • ext/ldap: Reduce scope of variable in b5fb9555e1
  • ext/ldap: Remove useless variable in 53fde8b5a8
  • ext/ldap: Use bool type instead of int type in 9af00b174a
  • ext/ldap: Use uint32_t type instead of int type in 61790eb8a0
  • ext/ldap: Use size_t type instead of int type in 5583273906
  • ext/date: null bytes in timezones can only happen via HT initialization in GH-19357
  • ext/intl: modernize tests in GH-19392
  • ext/intl: prevent creation of invalid UConverter instance in GH-19396
  • ext/intl: better errors for IntlTimeZone::createTimeZoneIDEnumeration in GH-19395
  • tree: remove some usages of the report_memleaks INI setting in GH-19407
  • ext/intl: Use ZPP specifier for IntlTimeZone::createEnumeration() in GH-19393
  • ext/intl: Refactor timezone parameter passing in GH-19409
  • Zend: Deprecate non-canonical cast names in GH-19372
  • UPGRADING and NEWS for recent 8.5 deprecations in 7b44bfd812
  • Deprecate the parameter of get_defined_functions() in GH-19425
  • ext/spl: Deprecate passing spl_autoload_call() to spl_autoload_unregister() in GH-19422
  • ext/intl: wrap DateTimeZone constructor exception in an IntlException in GH-19410
  • ext/spl: Deprecate SplObjectStorage::contains(), SplObjectStorage::attach(), and SplObjectStorage::detach() in GH-19424
  • Update NEWS/UPGRADING for recent commits in d65025b53d
  • ext/intl: Deprecate intl.error_level INI setting in GH-19430
  • ext/finfo: Deprecate the parameter for finfo_buffer() in GH-19378
  • ext/standard: Deprecate passing null to readdir(), rewinddir(), and closedir() in GH-19423
  • ext/openssl: Deprecate $key_length parameter of openssl_pkey_derive() in GH-19421
  • Update NEWS and UPGRADING for recent deprecation merges in e990b691c5
  • Update NEWS and UPGRADING in 2b5d978a85

Ilija Tovilo

  • Fix failed assertion with throwing __toString in binary const expr in 80022c035b
  • Fix incorrect anonymous class type name assertion in GH-19316
  • Fix stale nInternalPosition on rehashing in 5d40592fe2
  • Fix circumvented type check with return by ref + finally in d0fad34230
  • Implement changes to GH-17951 according to ML discussion in cd80ed6f7b
  • Upgrade to macOS 14 and backport necessary changes in e9e432a35d
  • COMMUNTIY build grouping adjustments in a63e97667e
  • Fix borked test in c69f04dbab
  • Fix ERROR_CODE handling in COMMUNITY build in 2cd9233e42

Jakub Zelenka

  • Fix release process feature freeze info in GH-19148
  • Fix GH-19428: openssl_pkey_derive segfaults for DH derive with low key_length in 9e2aa658a8
  • Fix php_openssl_pkey_derive merge issue in c064fc4fe8
  • Fix GH-19369: openssl_sign() - support for alias digest algs broken in c8d7318daf
  • Clean up test for GH-19369 - openssl_sign issue in 066a977840
  • Fix OpenSSL fetching of alias ciphers in 731d36ac61
  • Implement #80495: Enable to set padding in openssl_(sign|verify) in 702d18de99
  • Use OpenSSL libctx for various BIO readers in GH-19448
  • Fix #47728: Add missing openssl constants in 10834d1572

Jiří Pudil

  • [RFC] Extend #[\Override] to target properties in GH-19061

Jorg Adam Sowa

  • RFC: Deprecate date constant RFC7231 in GH-12989

Máté Kocsis

  • Add support for manually running the real-time benchmark on PRs in GH-19265
  • Fixes the real time benchmark in e8f88e746b
  • Add valgrind instruction count meansurement support to manual benchmark flow in 776d6f8660
  • Do not allow concurrent runs of the real time benchmark in 55a3e33bb1
  • Opcache is always available in the previous commit of the real time benchmark in 98e0dbcefe

Niels Dossche

  • Fix fuzzer after opcache became mandatory in GH-19292
  • Fix GH-19303: Unpacking empty packed array into uninitialized array causes assertion failure in 5bd5f352e5
  • Fix GH-19300: Nested array_multisort invocation with error breaks in a96b05e63f
  • Add missing hooks JIT restart code in 9ce51dad8b
  • Remove dynamic defs from property hooks in 771bfaf34d
  • Refactor op array loops in JIT in GH-19335
  • Fix GH-19371: integer overflow in calendar.c in 5cf45ba5ab
  • Use stack allocation in timezone_initialize() in GH-19394
  • Fix GH-19397: mb_list_encodings() can cause crashes on shutdown in cc93bbb765
  • Fix GH-18877: \Dom\HTMLDocument querySelectorAll selecting only the first when using ~ and :has in aecf2a6e62
  • Sync with lexbor/lexbor@49b43eba in GH-19442
  • Fix GH-19383: php-8.3.24: Missing type in function definition: fpm_event_kqueue_clean in b57578f3b1
  • Backport Lexbor changes to 8.4 in 91665eaa63
  • Fix GH-19065: Long match statement can segfault compiler during recursive SSA renaming in 9b86533ce4

Nikita Popov

Peter Kokot

  • Autotools: Update ax_check_compile_flag.m4 to serial 11 in GH-19127

Remi Collet

Shivam Mathur

  • Fix master branch check in find-target-branch.bat in GH-19385
  • Fix Windows test for openssl-3.5 upgrade in GH-19384

Theodore Brown

  • Deprecate terminating case statements with a semicolon in GH-19215

Tim Düsterhus

  • mysqli: Deprecate mysqli_execute() in GH-19286
  • standard: Deprecate socket_set_timeout() in GH-19285
  • pdo: Deprecate the uri: DSN scheme in GH-19274
  • reflection: Deprecate Reflection*::setAccessible() in GH-19273
  • fileinfo: Deprecate finfo_close() in GH-18396
  • UPGRADING: Fix formatting in d01aa02ef5
  • zend_compile: Deprecate backticks as an alias for shell_exec() in GH-19443

Volker Dusch

  • Update versions for PHP 8.5.0beta1 in 5f477d9457
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.