Tag: PHP

  • PHP 8.6.0 Released: Partial Application, Duration, and Poll (2026)

    PHP 8.6.0 Released: Partial Application, Duration, and Poll (2026)

    Takeaway: On November 19, 2026, the PHP project released PHP 8.6.0, a major language update it describes as “Faster, Safer, More Powerful.” The headline features are partial function application, a new \Time\Duration class, the Io\Poll API, a clamp() function, a SortDirection enum, and default values for readonly properties. Official support, according to the supported versions table, is active until 31 December 2028 and security-only until 31 December 2030. The 8.6.0 NEWS file also includes the same-day November 19 security fixes. That does not mean every site must migrate to 8.6 in order to be patched.

    Source downloads are linked from the 8.6.0 announcement and the project downloads pages. Before you move production traffic, read the official PHP 8.6 migration guide, including the pages for new features, backward-incompatible changes, and deprecated features. The notes below summarize selected official items. They are not a substitute for the manual.

    Headline features in PHP 8.6

    Partial function application

    Partial application lets you supply some of a function’s arguments now and get back a Closure for the rest. Placeholders are ? and .... The original function runs only after the remaining arguments are passed into that Closure. The official announcement uses a compact array_filter() example, where a comparison can be written directly as a partially applied version_compare() call instead of wrapping it in an arrow function:

    $versions = ['8.4', '8.5', '8.6', '8.7', '9.0'];
    $supportsPfa = array_filter(
        $versions,
        version_compare(?, '8.6', '>='),
    );

    A new Duration class

    The new \Time\Duration class represents elapsed time the way a stopwatch would: independent of a wall clock or timezone, with nanosecond precision and a documented range of more than 250 years. The release announcement presents it as a fit for timeouts and benchmark timings, with values that can be added, multiplied, and compared directly.

    The Io\Poll API

    Io\Poll is a new I/O multiplexing API. Officially, it uses the best available mechanism on each platform — epoll, kqueue, event ports, or WSAPoll — and is meant to avoid the scalability limits of stream_select(). PHP describes it as a common foundation that event-loop libraries such as ReactPHP and AMPHP can build on, not as a replacement for those libraries themselves.

    clamp(), SortDirection, and readonly defaults

    The new clamp() function, in the project’s wording, ensures that a given value — numeric or otherwise — falls within a specified range. A new SortDirection enum gives libraries a shared, type-safe way to express sort order.

    Readonly properties may now declare default values. Per the manual, that default counts as initialization, and the property cannot be assigned again, not even from the constructor. That is a change in how fixed values can be written, not a loosening of readonly after the property has been initialized.

    Support window and the same-day security fixes

    PHP’s standard policy is two years of active support, then two years of security-only support. For the 8.6 branch, the supported versions table lists an initial release of 19 November 2026, active support until 31 December 2028, and security support until 31 December 2030.

    8.6.0 also carries the November 19 security GHSA and CVE fixes recorded in its NEWS file. Operators who want those fixes without a major-version migration should use the matching point releases instead: 8.5.13, 8.4.28, 8.3.37, or 8.2.36, as described in our November 2026 PHP security update. A move to 8.6 is a language and runtime upgrade, and it should be tested against the migration guide first.

    Official incompatibilities and deprecations worth testing

    The incompatible-changes page is longer than this summary. A few official items are especially easy to trip over in existing code:

    • trim(), ltrim(), and rtrim() now strip the form-feed character (\f) by default.
    • The null-coalescing operator (??) and empty() on a magic property no longer call __get() when __isset() has already written the property into the property table; the freshly written value is used instead.
    • unpack() now treats a < or > immediately after a format code as an endianness modifier, not as the first character of the element name. A format such as "s<value" now produces the key "value".

    The official 8.6 announcement also notes tighter session defaults: session.use_strict_mode and session.cookie_httponly are enabled, and session.cookie_samesite is set to Lax. If your application depended on the previous defaults, test cookie and session behavior before you cut over.

    Among the deprecations, the manual now warns against a return inside a finally block, and against returning a value from __construct() or __destruct(). It also deprecates naming a function readonly. The official deprecation text says readonly is a reserved keyword, and that “a lexer exception was added in PHP 8.1 solely to keep an existing WordPress function of that name working.” This is a deprecation in 8.6, not a removal. This article does not attempt to say whether WordPress core has already renamed that function. Site owners who plan to move a WordPress stack to 8.6 should test their own code, plugins, and themes against the official migration notes rather than assume the outcome.

    Other official deprecations include using let or is as identifiers reserved for possible future syntax, passing an object where an array is expected to functions such as array_walk(), and several older aliases and extension APIs. Check the deprecated-features page for the complete list.

    Key facts

    ItemWhat official sources say
    Release dateNovember 19, 2026, according to the PHP 8.6 announcement and the 8.6.0 release page.
    Kind of releaseA major update of the PHP language.
    Headline featuresPartial function application, \Time\Duration, Io\Poll, clamp(), SortDirection, and readonly property defaults.
    Active support until31 December 2028.
    Security support until31 December 2030.
    Security fixes in 8.6.0The 8.6.0 NEWS file includes the November 19 GHSA/CVE fixes. Supported older branches received separate point releases the same day.
    Migration documentationThe official PHP 8.6 migration guide, plus the new-features, incompatible-changes, and deprecated-features pages.
    Notable official wordingNaming a function readonly is deprecated; the manual notes a PHP 8.1 lexer exception that existed to keep an existing WordPress function of that name working.

    FAQ

    When was PHP 8.6.0 released?

    November 19, 2026. That is the date on the official 8.6 announcement, the 8.6.0 release page, and the supported versions table.

    What are the headline features in PHP 8.6?

    The project highlights partial function application, a new \Time\Duration class, the Io\Poll API, a clamp() function, a SortDirection enum, and default values for readonly properties. The migration guide and new-features manual page cover these and other additions in more detail.

    How long will PHP 8.6 be supported?

    According to php.net’s supported versions table, the 8.6 branch has active support until 31 December 2028 and security support until 31 December 2030. That follows PHP’s usual two years of active support and two additional years of security-only support.

    Does PHP 8.6.0 include the November 19 security fixes?

    Yes. The 8.6.0 NEWS file lists the same-day GHSA and CVE fixes. Older supported branches were also patched in 8.5.13, 8.4.28, 8.3.37, and 8.2.36, so a major-version upgrade is not the only way to install those fixes.

    What should I read before upgrading?

    Start with the official PHP 8.6 migration guide, then the manual pages for new features, backward-incompatible changes, and deprecated features. Test your application, and any CMS or framework it uses, against those notes rather than relying on a summary.

    What happened to naming a function readonly?

    Declaring a function named readonly is deprecated in PHP 8.6. The official manual says a lexer exception was added in PHP 8.1 solely to keep an existing WordPress function of that name working. The change in 8.6 is a deprecation, not a removal. This article does not claim a current WordPress core status for that function; test before you migrate.

    Do I have to move to 8.6 to stay patched?

    No. If you are not ready to migrate, install the November 19 security release for your current supported branch. PHP 8.6.0 is the new major version and happens to include those fixes as well.

    What are some official backward-incompatible changes?

    Official examples include form-feed now being trimmed by default, a change in how ?? and empty() behave on magic properties after __isset() materializes them, and unpack() treating < and > after a format code as endianness modifiers. See the incompatible-changes page for the full list.

  • PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36 Security Updates (2026)

    PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36 Security Updates (2026)

    Takeaway: On November 19, 2026, the PHP project published four security releases: PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36. Each announcement describes the package as a security release and encourages users of that branch to upgrade. The practical step is to install the patched release that matches the branch you already run. PHP 8.6.0, released the same day, also includes these fixes, but it is a major upgrade. If you are not ready to migrate, patch the current supported branch instead of jumping to 8.6 just to be current on security.

    A day earlier, on November 18, PHP’s security team pre-announced a critical security release for all supported versions, scheduled for Thursday, 19 November 2026, between 14:00 and 14:30 UTC, as part of the project’s regular four-week cycle. The releases themselves are dated 19 November 2026. Announcement times on the mailing list were not identical for every tarball, so this article treats that date as the official publication day rather than claiming every build landed inside the 14:00–14:30 UTC window.

    What operators should install

    Use the patched point release for your branch. PHP does not ask 8.4 or 8.3 sites to move to 8.5 or 8.6 in order to receive this set of fixes. Source packages and Windows binaries are linked from the individual release pages and from the project’s downloads site. After you install the update, confirm the running PHP version in your usual way — a package bump on disk is not the same as the interpreter that is actually serving requests.

    If you runInstall
    PHP 8.6 (new major)8.6.0, which includes the security fixes listed in its NEWS file
    PHP 8.58.5.13
    PHP 8.48.4.28
    PHP 8.38.3.37
    PHP 8.28.2.36

    PHP 8.2 is in security-only support and, according to the official supported versions table, reaches end of life on 31 December 2026. It still received 8.2.36 as part of this release set. PHP 8.1 is not in that currently supported table.

    Official severity wording

    The November 18 pre-announcement said the highest severity is CRITICAL, and added: “The issues rated CRITICAL require either non-default configuration or uncommon setups.” Technical details and fixed version numbers were reserved for the releases themselves. This article stays with that official wording and with the one-line descriptions from each branch’s NEWS file. It does not add unofficial conditions, payloads, or workarounds.

    The fixes, by official NEWS listings

    Not every CVE appears in every branch. The lists below follow the official NEWS entries for the 19 November 2026 sections. Identifiers and one-line descriptions are copied from those files, not expanded from third-party write-ups. The project’s PHP 8 changelog is the other official index of changes.

    In 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0

    • GHSA-5j3f-64r7-f564 / CVE-2026-129538 — PHP-CGI out-of-bounds read and write during PATH_INFO correction
    • GHSA-gr4f-wgx5-jpfv / CVE-2026-129496 — Timezone cache use-after-free can lead to remote code execution
    • GHSA-qc49-hpvq-g2w6 / CVE-2026-129289 — PHP-FPM request smuggling through an unread HTTP request body
    • GHSA-3mg3-cr28-46gc / CVE-2026-129292 — PHP-FPM status endpoint XSS via unescaped user and script fields
    • GHSA-jm4m-qfqx-967m / CVE-2026-129291 — PHP-FPM epoll use-after-free can lead to local privilege escalation
    • GHSA-68fq-fh7h-f8gr / CVE-2026-128090 — PHAR OpenSSL signature bypass via algorithm downgrade
    • GHSA-fm2m-fjf5-v3cp / CVE-2026-126714 — Partially overwritten session files can lead to remote code execution
    • GHSA-658j-r8rw-q6mx / CVE-2026-115560 — Session serializer mismatch can lead to remote code execution
    • GHSA-q23r-hr55-xmpg / CVE-2026-15353 — SOAP information disclosure through malformed array dimensions
    • GHSA-4646-p932-gw34 / CVE-2026-129506 — SOAP use-after-free when processing DTD entity references
    • GHSA-f6gg-rchx-xw8j / CVE-2026-128064 — Mixed-case HTTPS and FTPS URLs can expose data in plaintext
    • GHSA-mmf9-xm3v-hg2x / CVE-2026-127960 — Denial of service through folded HTTP response headers

    Also in 8.3.37, 8.4.28, 8.5.13, and 8.6.0

    This item is in the official NEWS for 8.3.37, 8.4.28, 8.5.13, and 8.6.0. It is not in the 8.2.36 NEWS section for this date:

    • GHSA-g3vh-838c-65v7 / CVE-2026-129481 — Use-after-free after interrupted session shutdown

    Also in 8.4.28, 8.5.13, and 8.6.0

    This item is in the official NEWS for 8.4.28, 8.5.13, and 8.6.0. It is not in the 8.3.37 or 8.2.36 NEWS sections for this date:

    • GHSA-x8r7-mg3g-74hg / CVE-2026-129501 — Double free during DOM XML serialization

    Only in 8.5.13 and 8.6.0

    These three items appear in the official NEWS for 8.5.13 and 8.6.0. They are not in the 8.4.28, 8.3.37, or 8.2.36 NEWS sections for this date:

    • GHSA-8mjj-2r7p-4hg2 / CVE-2026-129474 — Use-after-free in magic method backtraces can lead to remote code execution
    • GHSA-2fjv-p558-g82m / CVE-2026-129182 — Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown
    • GHSA-mg3p-mxj9-g2mm / CVE-2026-129438 — Incorrect RFC 3986 URI serialization for oversized input

    How this sits alongside other November updates

    This is a PHP interpreter and runtime update, not a CMS or web-server patch. Sites that also run WordPress still need the recent WordPress 7.1.5 core security release on its own schedule. Hosts that terminate HTTP in nginx still need the matching nginx 1.31.9 or 1.30.7 packages if those apply. Applying one of those updates does not replace a PHP branch patch, and the other way around is also true.

    If a host or platform manages PHP for you, confirm that it has moved to 8.5.13, 8.4.28, 8.3.37, or 8.2.36 for the branch it provides — or to 8.6.0 only if that major upgrade is an intentional migration.

    Key facts

    ItemWhat official sources say
    Date19 November 2026, according to the PHP.net release announcements and NEWS files. A critical release was pre-announced on 18 November 2026.
    Security releasesPHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36. Each is described as a security release.
    Major release the same dayPHP 8.6.0 also lists these security GHSA/CVE fixes in its NEWS file, but it is a major language upgrade.
    Highest severityCRITICAL, per the November 18 pre-announcement. Issues rated CRITICAL require either non-default configuration or uncommon setups.
    Patch choiceInstall the matching point release for the branch you already run. Do not treat 8.6.0 as the only patched option.
    Branch coverageTwelve issues are listed for all five NEWS files named above. Additional issues appear only in newer branches. See the lists in this article.
    PHP 8.2 supportSecurity-only support, with end of life on 31 December 2026. PHP 8.1 is not in the currently supported versions table.
    Official indexesThe individual release pages, the PHP 8 changelog, and the NEWS files for each tag.

    FAQ

    What did PHP release on November 19, 2026?

    The project published four security releases — PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36 — and the major release PHP 8.6.0. The security announcements encourage users of each supported branch to upgrade to the matching patched version.

    Which version should I install?

    Install the point release that matches your current branch: 8.5.13, 8.4.28, 8.3.37, or 8.2.36. Move to 8.6.0 only if you are taking the major upgrade, not because the older branches were left unpatched.

    Do I need to upgrade to PHP 8.6.0 to get the security fixes?

    No. PHP 8.6.0 includes the same-day security fixes listed in its NEWS file, but the 8.5, 8.4, 8.3, and 8.2 branches each received their own security releases. If you are not ready to migrate, patch the branch you already run.

    How severe are these issues?

    The official pre-announcement on November 18 said the highest severity is CRITICAL, and that issues rated CRITICAL require either non-default configuration or uncommon setups. The release announcements themselves do not replace that wording with a different official severity scale.

    Did every supported branch receive every CVE?

    No. Twelve issues are listed in the 19 November 2026 NEWS sections for 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0. One additional issue appears from 8.3 upward, one from 8.4 upward, and three only in 8.5.13 and 8.6.0. Use the official NEWS file for your branch rather than assuming a single shared set.

    Does this replace web server or CMS security updates?

    No. These packages update PHP. A WordPress core update such as 7.1.5, or an nginx update such as 1.31.9 or 1.30.7, still needs to be applied on its own schedule if it applies to your stack.

    Where can I find the official list of fixes?

    Start with the release announcement for your branch, then check that branch’s NEWS file and the PHP 8 changelog on php.net. The identifiers and one-line descriptions in this article come from those NEWS files.

    Is PHP 8.2 still supported?

    Yes, but only for security fixes, and only until 31 December 2026, according to PHP’s supported versions table as of this article. PHP 8.2.36 is the security update for that branch. PHP 8.1 is not listed among the currently supported versions.