Blog PHP

PHP 8.6 Released: New Features and an Upgrade Plan for Teams

Written by Alfina Putri

8 min read

PHP 8.6 Released: New Features and an Upgrade Plan for Teams
On this page· 7 sections
  1. 1What ships in PHP 8.6
  2. 2Changes that can affect existing applications
  3. 3Performance and framework support
  4. 4What this means for web teams and application owners
  5. 5Frequently asked questions
  6. 6Closing
  7. 7Sources

PHP 8.6 was released on November 19, 2026. It adds partial function application, a Duration class, a clamp() function, and a Polling API. Web teams should also look at three session defaults that are now stricter and a long list of deprecations before they raise the version on production servers.

What ships in PHP 8.6

The PHP team calls the version a major update of the language in its release announcement. It lands exactly a year after PHP 8.5, in line with the project’s annual November schedule.

According to the supported versions page on php.net, the 8.6 branch receives active support until December 31, 2028 and security fixes until December 31, 2030. Each branch gets two years of full support, then two years of critical security fixes.

Matthew Weier O’Phinney of Zend describes the release as focused on additive features and developer experience. In his review, he writes that it is not on the scale of PHP 8.0 or 8.1.

Partial function application

The most discussed addition is partial function application. A developer can supply some of a function’s arguments in advance and mark the rest with ? or .... The result is a Closure, and the original function runs only once the remaining arguments are passed in.

The official example filters a list of versions:

$supportsPfa = array_filter(
    $versions,
    version_compare(?, '8.6', '>='),
);

Zend expects the feature to encourage use of the pipe operator (|>) that arrived in PHP 8.5.

The Duration class and clamp()

The \Time\Duration class represents elapsed time as a stopwatch would measure it. It is independent of any date or time zone, has nanosecond precision, and can cover a range of more than 250 years. That suits timeouts and retry delays, often written today as bare numbers.

The clamp() function keeps a value inside a given range. If the value falls outside it, the function returns the nearest boundary. clamp(110, 0, 100) returns 100, and the function works with Duration objects as well.

Polling API and stream errors

The Polling API (Io\Poll) watches many connections at once using the best mechanism on each operating system: epoll, kqueue, event ports, or WSAPoll. The PHP team notes that stream_select() typically cannot handle more than 1,024 connections. It is meant as a foundation for event loop libraries such as ReactPHP and AMPHP.

Stream operations can now be configured to throw a StreamException. Previously, a failed read only raised a warning.

Other additions

  • Readonly property defaults. A readonly property may now declare a default value. Laravel News points out that this used to be a compile-time error.
  • The SortDirection enum. It offers Ascending and Descending as a standard way to express sort order. Kinsta notes that PHP’s built-in sort functions do not accept it yet.
  • mysqli::quote_string(). It escapes a string and wraps it in quotes, matching PDO::quote().
  • Post-quantum cryptography in Sodium. The extension adds X-Wing and ML-KEM-768 key encapsulation.

Changes that can affect existing applications

Zend counts 26 deprecations in this release. Code that uses them still runs, but PHP emits a notice and some of the features will be removed in PHP 9.0. A handful of other changes alter behavior right away.

Three stricter session defaults

The PHP 8.6 migration guide lists three php.ini settings whose default values changed:

  • session.use_strict_mode is now 1 (was 0). PHP rejects session IDs it never created, which makes session fixation harder.
  • session.cookie_httponly is now 1 (was 0). JavaScript can no longer read the session cookie through document.cookie.
  • session.cookie_samesite is now Lax (was unset). The session cookie is not sent on cross-site requests, except for top-level navigations that use safe HTTP methods.

Table of the three session settings whose defaults changed in PHP 8.6: session.use_strict_mode from 0 to 1, session.cookie_httponly from 0 to 1, and session.cookie_samesite from unset to Lax

All three improve security, but they can interrupt flows that work today, such as a checkout page that receives a POST from a payment provider’s site and relies on the session cookie. For those cases, the migration guide says to set session.cookie_samesite to None together with session.cookie_secure set to 1. Applications with a custom session handler need to implement create_sid() and validateId().

Functions that behave differently

  • trim(), ltrim(), and rtrim() now strip the form feed character (\f) as well.
  • fclose(), file_put_contents(), and copy() return false when flushing or closing the stream fails. That failure used to be ignored.
  • Many functions throw a ValueError for out-of-range values, invalid flags, or strings that contain NUL bytes. Examples include number_format(), sleep(), getenv(), and file_exists().

Deprecated functions

  • All mbstring regex functions, such as mb_ereg() and mb_split(), because the Oniguruma library is no longer maintained. The replacement is the PCRE functions with the u modifier.
  • The aliases is_double(), is_long(), is_integer(), and doubleval(). Use is_float(), is_int(), and floatval().
  • return inside a finally block, and return values from __construct() and __destruct().
  • php://filter URLs with more than 16 filters when the filter.max_filter_count option is not set. Zend explains that the cap is meant to blunt attacks built on filter chains.

Performance and framework support

The release tagline includes the word “Faster”, but the announcement page carries no benchmark figures. The improvements it names are narrow, such as quicker printf() calls, cached stateless closures, and faster JSON encoding.

A Tideways benchmark published on November 16, 2026 shows what that means for real applications. Benjamin Eberlei, the founder of Tideways, tested PHP 8.6.0 RC 5 without JIT on a Hetzner server, with 15 concurrent users for 60 seconds.

  • Laravel 13.17.0 served 792.33 requests per second on PHP 8.6, compared with 792.70 on PHP 8.5 and 778.50 on PHP 8.4.
  • Symfony 8.1.9 gained about 2.5 percent, from 458.14 to 469.36.
  • WordPress 7.1.3 recorded 159.60, against 158.23 on PHP 8.5 and 160.30 on PHP 8.4.

Bar chart of the Tideways benchmark for Laravel 13: 778.5 requests per second on PHP 8.4, 792.7 on PHP 8.5, and 792.3 on PHP 8.6

Eberlei concludes that PHP 8.6 has “no major engine improvements that makes it broadly faster than previous versions.” In his view, application architecture and code matter far more. The test used demo applications, so your results may differ.

Official framework support is still catching up. The Laravel 13 release notes list PHP 8.3 through 8.5 as supported versions. The WordPress compatibility table, last updated on November 4, 2026, goes up to PHP 8.5.

What this means for web teams and application owners

PHP runs a large share of sites in Indonesia, from local government portals and campus systems to small online stores built on WordPress or Laravel. Nobody has to move this week. The pressing task is to know where each application stands.

  1. Record the PHP version on every server. Run php -v, then check the version used by PHP-FPM and by container images. Security fixes for PHP 8.2 end on December 31, 2026, and active support for PHP 8.4 ends on the same date. Applications on PHP 8.2 should move first, and the target can be 8.4 or 8.5, which frameworks already support.
  2. Install PHP 8.6 in a test environment. Kinsta recommends trying any new PHP release in staging before it reaches a live site. Turn on E_DEPRECATED reporting, run the full test suite, and collect the notices.
  3. Test sign-in and payment flows. Look for uses of document.cookie, cross-site POST requests, and custom session handlers. Where a flow depends on the old behavior, set the value explicitly in php.ini.
  4. Wait for official support before production. For Laravel and WordPress applications, the switch is safer once PHP 8.6 appears as a supported version.

Four steps for a PHP 8.6 migration: record the PHP version on every server, test in a staging environment, check sessions and cookies, then upgrade production once the framework supports it

Zend’s annual survey shows how often migrations slip. About one in three teams did not complete a PHP migration in the past year, and one in five had none planned at the time of the survey. Indonesia shows a similar pattern, as covered in our article on Komdigi’s alert to agencies that still run outdated PHP.

Teams that stay on an older branch should not delay security updates. On the same day as the 8.6 release, the PHP team shipped fixes for seven critical flaws in branches 8.2 through 8.5. Tracking PHP versions across applications is part of the web application development we do with clients.

Frequently asked questions

Is PHP 8.6 faster than PHP 8.5?

For real applications, the difference is small. The Tideways benchmark found Laravel 13 running at the same speed on both versions, Symfony about 2.5 percent ahead, and WordPress nearly level.

How long will PHP 8.6 be supported?

Active support runs until December 31, 2028. After that, the 8.6 branch receives critical security fixes only, until December 31, 2030.

Should a Laravel or WordPress application move to PHP 8.6 now?

Not yet. The Laravel 13 release notes list PHP 8.3 through 8.5, and the WordPress compatibility table does not include PHP 8.6. Test in staging first, then move production once your framework, plugins, and host state their support.

Closing

PHP 8.6 adds tools that make code shorter and tightens several defaults. The cost of the upgrade sits in session testing and libraries that are not ready. If you would like to map the PHP versions across your organization’s applications and plan the migration, the Merakit team is glad to talk.

Sources

The article at a glance

Save it or share it with your team.

Download
Summary infographic: PHP 8.6 Released: New Features and an Upgrade Plan for Teams

Topics

  • PHP
  • Web Development
  • Laravel
  • WordPress
  • Application Migration

Share this article

Talk to the Merakit Team

Facing a similar challenge in your organization?

Tell us what you need. Our team will help you map out the most sensible steps and solutions, without the jargon.