Home » Releases » PHP 8.5 »

PHP 8.5

Release Date
2025-11-20
Bugfix Support
Until 2027-12-31
Security Support
2029-12-31
Latest Release: 8.5.10 (2026-08-27)

Upgrade Tips

  • PHP 8.5 adds a built-in URI extension to parse, normalize, and handle URLs following _RFC 3986_ and _WHATWG URL_ standards.
  • The `|>` operator enables chaining callables left-to-right, passing values smoothly through multiple functions without intermediary variables.
  • Clone objects and update properties with the new `clone()` syntax, making the "with-er" pattern simple for `readonly` classes.
  • The #[\NoDiscard] attribute warns when a return value isn't used, helping prevent mistakes and improving overall API safety.
  • Static closures can now be used in constant expressions, especially useful in attributes.
  • New array helper functions are available for common functionality
  • Handles can now be persisted across multiple PHP requests, avoiding the cost of repeated connection initialization to the same hosts.