PHP 8.5 focusses on readability, debugging features and more security

Release Candidate 1 for PHP 8.5 is now available. The Release Manager confirms the scheduled development status and the complete integration of all features.

listen Print view
Leaf blower in action

(Image: Smileus/Shutterstock.com)

3 min. read
Contents

PHP 8.5 is due to be officially released on 20 November 2025 – and the first release candidate is now available. The upcoming version will focus on improvements in code readability, new utility functions, extended debugging options, and detailed improvements in performance and security.

PHP 8.5 introduces the new pipe operator |>. Developers can use it to chain function calls linearly instead of writing nested structures. The example from the RFC is intended to illustrate this:

function getUsers(): array {
    return [
        new User('root', isAdmin: true),
        new User('john.doe', isAdmin: false),
    ];
}
 
function isAdmin(User $user): bool {
    return $user->isAdmin;
}
 
// This is the new syntax.
$numberOfAdmins = getUsers()
    |> (fn ($list) => array_filter($list, isAdmin(...))) 
    |> count(...);
 
var_dump($numberOfAdmins); // int(1);

With array_first() and array_last(), developers can retrieve the first or last value of an array without changing the array pointer (see RFC):

function array_first(array $array): mixed {}
function array_last(array $array): mixed {}

The new functions get_error_handler() and get_exception_handler() provide direct insight into the active handlers. PHP now also provides complete stack traces for fatal errors and automatically hides sensitive parameters if they are marked with #[\SensitiveParameter].

Videos by heise

PHP 8.5 allows final properties to be declared directly as part of the constructor property promotion (see RFC). Developers thus save boilerplate code and define final properties in the same way as normal properties in the constructor.

The attribute #[\NoDiscard] warns if important return values remain unused. PHP now also supports static closures in constants, default parameters, and attributes.

The locale_is_right_to_left() function recognizes languages that are read from right to left. [curl_multi_get_handles()[/code] simplifies the management of cURL multi-handles. With the constant PHP_BUILD_DATE and the CLI command php --ini=diff, the development team behind the programming language wants to simplify debugging and auditing.

iX spoke to Volker Dusch, Release Manager for PHP 8.5, who confirmed: “The timeline has been adhered to, all feature RFCs have been implemented, and, as always, well tested.” In one of 46 deprecations, there was a need for adaptation for the PHP framework Symfony, for which a follow-up RFC was created—a normal process. There have been no substantial changes since the betas. “There are no significant breaking changes. Deprecations are merely indications of future adjustments,” says Dusch.

Release Manager Volker Dusch speaks at betterCode() PHP 2025
betterCode() PHP on 25 November 2025

(Image: nuevoimg / 123rf.com)

On 25 November, betterCode() PHP will take place, an online conference organised by iX and dpunkt.verlag in cooperation with thePHP.cc. Interested parties can find out more about the programming language in presentations and discussion rounds. Discounted tickets at the early bird rate are available via the conference website.

PHP 8.5 does not bring a revolution, but many well-thought-out improvements. From leaner code with the pipe operator to safer error handling and new debugging tools, the focus is clearly on the developer experience. Further information on the release can be found on GitHub or on php.net.

(mdo)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.