Programming

PHP 8.6 released with partial function application, Duration class, polling API and clamp()

The PHP project released PHP 8.6.0, a major update to the language, on the same day as security releases PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13. New features include partial function application, a \Time\Duration class, a polling API for event loops, a clamp() function, a SortDirection enum, JSON error locations and readonly property defaults. Sessions now start with strict mode and HttpOnly cookies enabled and SameSite set to Lax, and custom session handlers lacking create_sid() and validateId() are deprecated.

AI-written summary, checked against the cited sources. How summaries work

Image: Phoronix

Why it matters

PHP applications upgrading to 8.6 inherit stricter session defaults and deprecations for custom session handlers, so login flows should be tested before upgrading. Users of older branches should apply the 8.2.36, 8.3.37, 8.4.28 or 8.5.13 security releases.

What we know

Confirmed by several sources

Reported by one source

  • PHP 8.6 adds JSON error locations, readonly property defaults and new deprecations. — Laravel News
  • Sessions now start with session.use_strict_mode and session.cookie_httponly enabled and session.cookie_samesite set to Lax. — Help Net Security
  • Custom session handlers that do not implement both create_sid() and validateId() are deprecated. — Help Net Security
  • PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 security releases addressing multiple security issues were published the same day. — Phoronix
  • PHP 8.6 adds a SortDirection enum. — LWN.net

Open questions

  • It is not yet clear which specific vulnerabilities the accompanying security releases fix. — Phoronix

Coverage 6 publishers

  1. Hacker NewsFirst report

    PHP: PHP 8.6 Release Announcement

    PHP 8.6 is a major update of the PHP language, with new features including Partial Function Application, a new Duration class, a Polling API, and a new clamp() function

  2. Lobsters

    PHP: PHP 8.6 Release Announcement

    PHP 8.6 is a major update of the PHP language, with new features including Partial Function Application, a new Duration class, a Polling API, and a new clamp() function

  3. LWN.net

    PHP 8.6.0 released

    Version 8.6.0 of PHP has been released. Notable changes in this release include a polling API, a new clamp() function, a SortDirection enum, and a \Time\Duration class. See "What's new in 8.6" for more on new features, and the changelog for…

  4. Phoronix

    PHP 8.6 Released With Partial Function Application, Other New Features

    Following today's PHP 8.2.36, PHP 8.3.37, PHP 8.4.28, and PHP 8.5.13 security releases to address multiple security issues, PHP 8.6.0 made its official debut today...

  5. Help Net Security

    PHP 8.6 is out, and here’s what changes for your code

    PHP 8.6 has been released. The new version adds partial function application, a Time\Duration class, a polling API for event loops and a clamp() function. PHP 8.6 also changes defaults that existing apps could trip over. Sessions now start…

  6. Laravel News

    PHP 8.6 is released!

    PHP 8.6 is out with partial function application, a clamp() function, a Duration class, JSON error locations, readonly property defaults, and new deprecations.

Earliest report first. Articles stay on their publishers’ sites; each link opens the original.