The PHP 8.5 release date has finally been confirmed. PHP 8.5 will be released on November 20, 2025. The latest release will feature a bunch of stunning features and enhancements. Interestingly, PHP 8.5 comprises new utility functions alongside enhanced debugging capabilities. Additionally, this update introduces several options specifically for developers.
This blog post discusses the PHP 8.5 release, including new features and enhancements.
New Features and Improvements
This section highlights what’s new for businesses, developers, users, and other stakeholders regarding the PHP 8.5 release.
The Pipe Operator (|>)
This PHP 8.5 update comprises the Pipe Operator, which is an invaluable feature for PHP developers who wish to chain various callables together and pass a value from left to right in a native way through them:
$result = 'Hello World'
|> strtoupper(...)
|> str_shuffle(...)
|> trim(...);
// Output: 'LWHO LDLROE' (or similar shuffled result)
// Equivalent to nested calls:
$result = trim(str_shuffle(strtoupper('Hello World')));
// Or using variables:
$result = 'Hello World';
$result = strtoupper($result);
$result = str_shuffle($result);
$result = trim($result);
New Array Functions: array_first() and array_last()
PHP 8.5 has introduced two crucial functions for retrieving the first and last values of an array. This will help complement the current array_key_first() and array_key_last() functions from PHP 7.3.
$users = ['Alice', 'Bob', 'Charlie']; $firstUser = array_first($users); // 'Alice' $lastUser = array_last($users); // 'Charlie' // Works with associative arrays too $data = ['name' => 'John', 'age' => 30, 'city' => 'Berlin']; echo array_first($data); // 'John' echo array_last($data); // 'Berlin' // Returns null for empty arrays $empty = []; var_dump(array_first($empty)); // null var_dump(array_last($empty)); // null
These functions are identical to:
- array_first($array) → $array[array_key_first($array)]
- array_last($array) → $array[array_key_last($array)]
New Error and Exception Handler Getters
PHP 8.5 includes two advanced functions that enable developers to recover the active error and exception handlers: get_error_handler() and get_exception_handler(). As a result, tasks like framework development and handler chaining will become easier.
Moreover, this feature will help improve error-handling configurations during debugging. Likewise, developers can override handlers temporarily and preserve the original with this feature.
As you might know, these two functions return the current handler callable or null if no custom handler is determined.
New cURL Function: curl_multi_get_handles()
The cURL extension now has a new function that helps retrieve all handles from a multi-handle:
$multiHandle = curl_multi_init();
$ch1 = curl_init('https://api.example.com/users');
$ch2 = curl_init('https://api.example.com/posts');
curl_multi_add_handle($multiHandle, $ch1);
curl_multi_add_handle($multiHandle, $ch2);
// New in PHP 8.5: Get all handles
$handles = curl_multi_get_handles($multiHandle);
// Returns: [$ch1, $ch2]
// Execute and process results
$running = null;
do {
curl_multi_exec($multiHandle, $running);
} while ($running > 0);
foreach ($handles as $handle) {
$response = curl_multi_getcontent($handle);
curl_multi_remove_handle($multiHandle, $handle);
}
New Locale Function: locale_is_right_to_left()
PHP 8.5 now supports identifying right-to-left (RTL) locales. This will help enhance internationalization capabilities:
// Check if locale uses RTL writing
$isRTL = locale_is_right_to_left('ar_SA'); // true (Arabic)
$isLTR = locale_is_right_to_left('en_US'); // false (English)
$isFarsi = locale_is_right_to_left('fa_IR'); // true (Persian/Farsi)
// Object-oriented approach
$isRTL = Locale::isRightToLeft('he_IL'); // true (Hebrew)
With this improvement, developers can build multilingual web applications more effectively. Additionally, they can dynamically assign CSS classes, such as .rtl or .ltr.
New PHP_BUILD_DATE Constant
According to this feature, the new constant provides the build date of the PHP binary. Its role comes in handy when performing tasks like version auditing and debugging:
echo PHP_BUILD_DATE; // e.g., 'Nov 15 2025 10:30:45' // Useful for debugging in production echo 'PHP Version: ' . PHP_VERSION . "\n"; echo 'Build Date: '. PHP_BUILD_DATE . "\n";
CLI Enhancement: php –ini=diff
You can benefit from an advanced CLI option when outputting only non-default INI directives:
# Show only modified settings php --ini=diff # Example output: # memory_limit = 256M (default: 128M) # max_execution_time = 60 (default: 30)
PHP 8.5 Release Date Timeline
For users’ convenience, here is the PHP 8.5 release date timeline:
|
Date |
Release Name |
| July 03 2025 | Alpha 1 |
| July 17 2025 | Alpha 2 |
| July 31 2025 | Alpha 3 (skipped) |
| August 12 2025 | Feature Freeze |
| August 14 2025 | Beta 1 |
| August 28 2025 | Beta 2 |
| Sep 11 2025 | Beta 3 |
| Sep 25 2025 | RC1 |
| Oct 09 2025 | RC2 |
| Oct 23 2025 | RC3 |
| Nov 06 2025 | RC4 |
| Nov 20 2025 | GA |
What is the PHP 8.5 Changelog?
The PHP 8.5 changelog is not official yet since the planned release date is November 20, 2025. However, several features, changes, and deprecations have been identified. For instance, developers can use a pipe operator that allows chaining of callables in a left-to-right sequence.
Wrapping Up
PHP 8.5 release offers a potent mix of impactful features that streamlines developers’ experience. Additionally, new array functions efficiently address developers’ requests, improving development workflows.
Likewise, the pipe operator helps developers chain function calls cleanly. In short, the PHP 8.5 release has sought to address developers’ pain points more effectively.
