PHP 8.5 is available on all servers
PHP 8.5 is now available on servers managed by ServerPilot. There are many improvements, changes, new features, and deprecations in PHP 8.5.
PHP 8.5.0 will be released for General Availability (GA) on November 20, 2025.
All servers will be automatically updated from the Release Candidate (RC) to the GA release.
Here we’ll provide a summary of the most important changes in PHP 8.5. For the full list of changes, see PHP’s official documentation on migrating code from PHP 8.4 to 8.5.
PHP 8.5 is available on servers running Ubuntu 20.04 and newer.
Changes in PHP 8.5
New Features in PHP 8.5
Pipe operator |>
PHP 8.5 adds a new operator, the pipe operator |> to chain multiple callables from left to right,
taking the return value of the left callable and passing it to the right. Learn
more.
curl_multi_get_handles function
The Curl extension in PHP 8.5 adds a new function named curl_multi_get_handles
that returns an array of CurlHandle objects from a CurlMultiHandle object.
PHP_BUILD_DATE constant
PHP 8.5 introduces a new PHP constant named PHP_BUILD_DATE
that is assigned the time and date the PHP binary is built.
get_exception_handler and get_error_handler functions
PHP 8.5 allows setting custom error and exception handlers which get called when an error is triggered, or an exception is uncaught. It is also possible to restore the previous exception and error handlers. Learn more.
Stack trace support for PHP Fatal errors
PHP 8.5 adds a new feature so that fatal error messages contain the full stack trace. Learn more.
locale_is_right_to_left function and Locale::isRightToLeft method
The Intl extension in PHP 8.5 adds new functionality to determine
if a given locale uses an RTL (Right-to-Left) script.
array_first and array_last functions
PHP 8.5 adds two new functions for retrieving the first and last values of an array.
These functions complement the array_key_first and array_key_last functions added in PHP 7.3. Learn
more.
php —ini=diff to output non-default INI directives
The PHP CLI executable in PHP 8.5 supports a new php —ini=diff command-line flag,
which lists INI directives that differ from the built-in default values.
IntlListFormatter class
The Intl extension in PHP 8.5 adds a new class named IntlListFormatter.
It provides locale-aware formatting for lists into human-readable lists of “and”-lists, “or”-lists, or units.
max_memory_limit INI directive to set a ceiling memory_limit
When a max_memory_limit value is set,
it becomes the largest value the memory_limit INI is allowed to set.
Deprecations in PHP 8.5
- all
MHASH_*constants are deprecated along with the existing deprecation for themhashfunctions. - PHP 8.5 deprecates the four alternative scalar type names (
integer,double,boolean, andbinary). - Returning non-string values from a user output handler is deprecated.
- Emitting output from custom output buffer handlers is deprecated.
How to Switch to PHP 8.5
You can change an app to use PHP 8.5 through your app’s Settings in ServerPilot. If your app does not work with PHP 8.5, you can easily change back to the PHP version you were using before.
As always, please contact us if you have any questions.