What’s New in PHP 8.5 Alpha 1? Key Features and Release Timeline
The first Alpha of PHP 8.5 has been released, bringing support for closures in constant expressions, fatal‑error backtraces, a #[\NoDiscard] attribute, (void) casts, a pipe operator, new array_first() and array_last() functions, and a CLI “--ini=diff” option, with a stable version slated for late November.
Developers, the first Alpha of PHP 8.5 was released this week, marking the start of the release cycle for the upcoming stable version.
PHP 8.5 Alpha 1 introduces several notable changes:
Support for closures and first‑class callable functions in constant expressions.
Backtraces for fatal errors.
New #[\NoDiscard] attribute to indicate that a function’s return value is important and should be used.
Support for (void) cast to explicitly discard a value.
Support for casts inside constant expressions.
Introduction of the pipe operator.
New array helper functions array_first() and array_last().
PHP CLI now accepts the “--ini=diff” option to display INI settings that differ from the built‑in defaults.
PHP 8.5 aims for a stable release in late November, with multiple Alpha, Beta, and release‑candidate versions planned for October and November.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
