PHP 8.6 is out. PHP 8.6.0 was released on 19 November 2026, right on the PHP 8.6 release date set in the official timetable. It brings partial function application, a new Time\Duration class, a native polling API, clamp(), readonly property defaults and safer session defaults, plus a long list of deprecations to check before you upgrade. It gets active support until 31 December 2028 and security fixes until 31 December 2030.
New PHP versions arrive every November, and every November the same question lands in agency Slack channels: upgrade now, or wait? The answer depends less on the new features and more on what your plugins, themes and packages still call. If you are still catching up from older versions, our guide to changing the PHP version in xCloud covers the basics.
This guide covers the release timeline and support dates, the new features with code, the deprecations that will show up in your logs, how to test WordPress and Laravel on PHP 8.6 yourself, and when an upgrade makes sense.
TL;DR
Short on time? Here is the whole guide in a few lines:
- PHP 8.6.0 was released on 19 November 2026. Active support runs until 31 December 2028, security fixes until 31 December 2030.
- The headline feature is partial function application:
stuff(1, ?, 3)returns a closure instead of calling the function. - New in the box: a
Time\Durationclass, theIo\PollAPI,clamp(), aSortDirectionenum, structured stream errors and readonly property defaults. - Session defaults change:
session.use_strict_mode,session.cookie_httponlyandsession.cookie_samesite=Laxare now on by default. - Many old aliases are deprecated, including
is_double(),is_long(),is_integer(),doubleval()andspl_object_hash(). - PHP 8.6 is now available on xCloud NGINX servers. Test on a staging site, then switch one site at a time.
- Rule of thumb: test on staging now, upgrade production once your plugins or packages declare support.
PHP 8.6 Release Date and Timeline
PHP follows a fixed yearly cycle: alphas in July, betas from August, release candidates every two weeks from late September, and general availability (GA) in late November. The official PHP 8.6 timetable set GA for 19 November 2026, and the release shipped on that day.
| Milestone | Date |
|---|---|
| Alpha 1 | 2 July 2026 |
| Beta 1 and soft feature freeze | 13 August 2026 |
| Hard feature freeze | 22 September 2026 |
| Release candidates | Late September to mid-November 2026, ending with RC7 |
| GA (PHP 8.6.0) | 19 November 2026 ✅ released |
The release managers are Daniel Scherzer, Matteo Beccati and Joe Ferguson. The same day, PHP also shipped security releases for older branches (8.2.36, 8.3.37, 8.4.28 and 8.5.13); our PHP security release post covers who needs to patch.
PHP 8.6 Support and End-of-Life Dates
Every PHP version gets two years of active support (bug and security fixes), then two years of security fixes only. Here is where PHP 8.6 sits next to the versions most sites run, from the official supported versions page:
| Version | Released | Active support until | Security fixes until |
|---|---|---|---|
| PHP 8.6 | 19 Nov 2026 | 31 Dec 2028 | 31 Dec 2030 |
| PHP 8.5 | 20 Nov 2025 | 31 Dec 2027 | 31 Dec 2029 |
| PHP 8.4 | 21 Nov 2024 | 31 Dec 2026 | 31 Dec 2028 |
| PHP 8.3 | 23 Nov 2023 | 31 Dec 2025 | 31 Dec 2027 |
| PHP 8.2 | 8 Dec 2022 | 31 Dec 2024 | 31 Dec 2026 (end of life soon) |
If you’re still on PHP 8.2, it reaches end of life on 31 December 2026, six weeks after PHP 8.6 shipped. Moving off it matters far more than moving to 8.6.
New Features in PHP 8.6 (with Code)
PHP 8.6 is a smaller release than 8.0 or 8.4. Most of what you will feel day to day is one big syntax addition and several quality-of-life changes. Everything below comes from the official PHP 8.6 release announcement and the PHP 8.6 UPGRADING notes.
1. Partial Function Application
This is the headline feature. You call a function with some arguments filled in and replace the rest with ? (exactly one argument) or ... (any remaining arguments). PHP returns a closure instead of running the function.
<?php
// Before: a wrapper closure just to fix one argument
$prices = array_map(fn ($p) => round($p, 2), $raw);
// PHP 8.6: fill in the precision, leave the value as a placeholder
$prices = array_map(round(?, 2), $raw);
// Fix the first argument, accept the rest later
$log = sprintf('[%s] %s', ...);
The RFC passed 33 votes to 0. The UPGRADING notes also say array_map() with a partial or first-class callable callback is compiled into an equivalent foreach loop, so the shorter form is not slower.
2. A New Time\Duration Class
Time\Duration represents elapsed time, like a stopwatch, with nanosecond precision and no time zone. It replaces the old habit of passing “microseconds as an int” around, and durations can be compared directly.
<?php
use Time\Duration;
$delay = Duration::fromSeconds(1)->add(Duration::fromMilliseconds(100));
$delay = min($delay, Duration::fromSeconds(30)); // durations are comparable
time_nanosleep($delay->seconds, $delay->nanoseconds);
3. The Io\Poll API for Many Connections
The new Io\Poll API watches many streams at once using the best mechanism on each platform (epoll, kqueue, event ports or WSAPoll). It avoids the roughly 1,024-connection ceiling of stream_select(), and it is built for event-loop libraries such as ReactPHP and AMPHP. Most WordPress sites won’t touch it directly; long-running PHP servers and workers will.
4. clamp() and the SortDirection Enum
clamp() keeps a value inside a range, replacing the max($min, min($value, $max)) pattern. The SortDirection enum (Ascending, Descending) gives libraries one shared, type-safe way to express sort order instead of a mix of integers and strings.
<?php
clamp(150, min: 0, max: 100); // 100
clamp(-10, min: 0, max: 100); // 0
function orderBy(string $column, SortDirection $direction = SortDirection::Ascending) { /* ... */ }
5. Structured Stream Errors
File and stream functions can now throw a StreamException (or fail silently) instead of emitting warnings you catch with @ and error_get_last(). Each error is a StreamError object with a StreamErrorCode enum case, so logging and handling failures in file, HTTP or socket code becomes much cleaner.
6. Readonly Properties Can Declare Defaults
Until now, a readonly property had to be set in the constructor. In PHP 8.6 it can carry a default value, which cuts constructor boilerplate in value objects and DTOs.
<?php
final class RetryPolicy
{
public readonly int $attempts = 3;
public readonly int $delayMs = 500;
}
7. #[\Override] on Class Constants
PHP 8.3 added #[\Override] for methods. PHP 8.6 extends it to class constants, including enum cases, so a typo in an overriding constant name becomes an error instead of a silent new constant.
<?php
class BaseCache { public const TTL = 60; }
class PageCache extends BaseCache
{
#[\Override]
public const TTL = 300;
}
8. Smaller Additions Worth Knowing
- Parameters can have their own doc comments, read with the new
ReflectionParameter::getDocComment(). ReflectionProperty::isReadable()andisWritable()tell you whether a property can be read or written in a given scope.- Enums can define
__debugInfo(), sovar_dump()output can be customized. - Objects stored in constants can be mutated with
CONST_OBJ->prop = $value. trim(),ltrim()andrtrim()now strip form feed (\f) by default.mysqli_quote_string()andmysqli::quote_string()are new.grapheme_strrev()reverses a string by grapheme cluster, so emoji and accented characters survive.pack()andunpack()accept<and>endianness modifiers on signed and unsigned integer codes.printf()with only%sand%dis compiled into plain string interpolation, skipping the function call.
Breaking Changes and Deprecations in PHP 8.6
Deprecations do not break anything on day one. They fill your logs with E_DEPRECATED notices and warn you that the next major version will remove the feature. The behavior changes below are the ones that can change how a site works right away.
Session Defaults Are Now Secure Out of the Box
This is the change most likely to surprise someone running PHP’s native sessions. Three php.ini defaults flip:
| Setting | Before PHP 8.6 | PHP 8.6 default | What can break |
|---|---|---|---|
session.use_strict_mode |
0 | 1 | Custom handlers that accept session IDs they did not create |
session.cookie_httponly |
0 | 1 | JavaScript that reads the session cookie via document.cookie |
session.cookie_samesite |
unset | Lax | Flows that need the session cookie on a cross-site POST |
The cross-site POST case is the one to test. If any part of a checkout or login flow posts back to your site from another domain and expects the PHP session to be there, it will need session.cookie_samesite=None with session.cookie_secure=1. Laravel manages sessions through its own drivers, so this mainly matters to code that calls session_start() directly.
Deprecations That Will Show Up in Your Logs
| Deprecated in PHP 8.6 | Use instead |
|---|---|
is_double() |
is_float() |
is_long(), is_integer() |
is_int() |
doubleval() |
floatval() |
spl_object_hash() |
spl_object_id() |
strcoll(), SORT_LOCALE_STRING |
Collator methods (intl) |
mysqli_stmt_init() |
mysqli::prepare() |
mysqli_get_charset() |
See the PHP 8.6 deprecations RFC |
metaphone() |
A userland phonetic library |
return inside a finally block |
Return after the try/finally |
Returning a value from __construct() or __destruct() |
Nothing; constructors return nothing |
A third argument to define() |
Two arguments only |
Mbregex (mb_ereg* functions) |
PCRE (preg_* functions) |
Mbregex is the one to watch in older WordPress plugins and themes. It is deprecated because the Oniguruma library behind it is no longer maintained, so code using mb_ereg_replace() and friends should move to preg_replace().
How to Test WordPress and Laravel on PHP 8.6
We have not run a WordPress or Laravel test suite on PHP 8.6 for this post, so there is no compatibility verdict here. What follows is how to do the check yourself, safely, before you switch a live site. The official Docker image now publishes PHP 8.6 tags such as php:8.6-cli.
Step 1: Copy the Site, Never Test on Production
Work on a copy. On xCloud, a staging environment gives you a full copy of a WordPress site, and a fresh backup gives you a way back. Download the code (or git clone the repo) to a machine with Docker.
Step 2: Search for Deprecated Calls
Before running anything, grep the code you own for the functions PHP 8.6 deprecates. Point it at wp-content for WordPress, or app and vendor for Laravel.
grep -rnE --include='*.php' \
'\b(is_double|is_long|is_integer|doubleval|spl_object_hash|metaphone|strcoll|mysqli_get_charset|mysqli_stmt_init|mb_ereg[a-z_]*)\s*\(' \
wp-content/plugins wp-content/themes
Every hit is a notice you will see in the log on PHP 8.6. Hits in third-party plugins tell you which vendor to check for an update.
Step 3: Lint and Run the Code on PHP 8.6
Lint every file with the 8.6 binary to catch parse errors, then run your tests with all errors reported.
# Lint every PHP file with PHP 8.6
docker run --rm -v "$PWD":/app -w /app php:8.6-cli \
sh -c "find . -name '*.php' -not -path './node_modules/*' -print0 | xargs -0 -n1 php -l | grep -v '^No syntax errors'"
# Laravel or any Composer project: run the test suite on PHP 8.6
docker run --rm -v "$PWD":/app -w /app php:8.6-cli \
php -d error_reporting=E_ALL -d display_errors=1 vendor/bin/phpunit
The plain cli image ships without extensions such as intl, gd or redis, so a test that needs one will fail for that reason, not because of PHP 8.6. Note those failures separately.
Step 4: Read the Deprecation Notices
For WordPress, browse the staging copy with WP_DEBUG and WP_DEBUG_LOG set to true in wp-config.php, then read wp-content/debug.log. Each Deprecated: line names the file and line number, which is exactly what a plugin author needs in a bug report.
Should You Upgrade to PHP 8.6?
The honest answer for most production sites: not in the first weeks. A .0 release is stable, but the ecosystem around it is not. Extensions, plugins and Composer packages catch up over the following weeks.
| Your situation | What to do |
|---|---|
| WordPress site with many plugins | Stay on PHP 8.5, test 8.6 on staging, upgrade after your key plugins confirm support |
| WooCommerce or membership site | Test checkout and login on staging first; the session default changes matter most here |
| Laravel app with a test suite | Run the suite on PHP 8.6 now; upgrade once your packages allow PHP 8.6 in composer.json |
| Still on PHP 8.2 or older | Upgrade to PHP 8.4 or 8.5 first; that jump matters far more than 8.6 |
| Building a new project | Develop against 8.6 locally, deploy on 8.5 until your host offers 8.6 |
WordPress’s own PHP compatibility table currently stops at PHP 8.5, which WordPress 6.9, 7.0 and 7.1 support. Official PHP 8.6 support is planned for WordPress 7.2, scheduled for release on 8 December 2026. Test on a staging site now, and move a busy site once 7.2 and your plugins support 8.6. Our post on what’s new in WordPress 7.0 covers the core side.
If you only remember one line: the version you upgrade from matters more than the version you upgrade to. A site still on an end-of-life PHP release has a security problem today, and PHP 8.6 will not fix it for you. Our PHP security guide explains why.
Run Modern PHP on xCloud Without the Server Work
Here is what xCloud does today, and what it doesn’t.
What xCloud does today:
- ✅ PHP 8.6 on NGINX servers (Ubuntu 22.04, 24.04 and 26.04, x64 and ARM). Follow how to use PHP 8.6 on xCloud to test it on a staging site first. You pick it per site; it can’t be the server default yet.
- ✅ PHP 5.6 to 8.5 on NGINX servers, and 7.4 to 8.5 on OpenLiteSpeed, depending on Ubuntu version and CPU. The PHP versions compatibility table lists every combination.
- ✅ Several PHP versions on one server. Install them from ‘Management’ → ‘Manage PHP’ and set the version per site, so you can move one site at a time.
- ✅ One-click security patches for the PHP version you already run, from the same Manage PHP page (step-by-step guide).
- ✅ Per-version extensions from the PHP extensions panel.
What it doesn’t do (yet):
- ❌ PHP 8.6 isn’t on OpenLiteSpeed yet, because LiteSpeed hasn’t published every PHP 8.6 extension xCloud installs. OLS servers stay on PHP 8.5 for now.
- ❌ New PHP versions arrive before every extension does. On PHP 8.5, xCloud does not offer the
memcached,imapormsgpackextensions. Check the extensions panel before you switch a site that depends on one.
One support lesson to carry into any upgrade: changing a site’s PHP version resets its PHP and PHP-FPM settings to that version’s defaults. Our support queue in the last 90 days included a report of sites running slower after a PHP upgrade reset their custom settings. Note your custom values (memory limit, PHP workers, upload size) before you switch, and reapply them afterwards.
👉 Ready to run PHP the managed way? Start with xCloud PHP hosting or Laravel hosting, and switch versions per site when your code is ready.
Plan Your PHP 8.6 Upgrade Now It’s Out
PHP 8.6 shipped on 19 November 2026 with partial function application, Time\Duration, the polling API, clamp(), readonly defaults and secure session defaults. None of it forces you to move on day one, and the deprecations give you a full major-version cycle to clean up.
This week, run the grep from Step 2 on one real project and spin up a staging copy. Within a day you will know exactly which plugins or packages hold you back, and the upgrade becomes a scheduled task instead of a 3 a.m. surprise. If you’re still on PHP 8.2, move to 8.4 or 8.5 before 31 December 2026.
If you have found this blog helpful, feel free to subscribe to our blogs for valuable tutorials, guides, knowledge, and tips on web hosting and server management. You can also join our Facebook community to share insights and engage in discussions.
Frequently Asked Questions
When was PHP 8.6 released?
PHP 8.6.0 was released on 19 November 2026, on the date set in the official PHP 8.6 timetable. It gets active support until 31 December 2028 and security fixes until 31 December 2030.
How long is PHP 8.6 supported?
PHP 8.6 gets two years of active support, until 31 December 2028, and then security fixes only until 31 December 2030. After that it reaches end of life and gets no more fixes.
Is PHP 8.6 available on xCloud?
Yes. PHP 8.6 is available on xCloud NGINX servers running Ubuntu 22.04, 24.04 or 26.04. Install it under Management → Manage PHP, test your sites, plugins and themes on a staging site, then switch one site at a time. OpenLiteSpeed servers stay on PHP 8.5 for now.
What’s the difference between PHP 8.6 and PHP 8.5?
PHP 8.6 adds partial function application, a Time\Duration class, the Io\Poll API, clamp(), the SortDirection enum, readonly property defaults and structured stream errors. It also turns on secure session defaults and deprecates old aliases such as is_double() and spl_object_hash(). PHP 8.5 keeps active support until 31 December 2027.
Will PHP 8.6 break my WordPress site?
Probably not WordPress core itself, but plugins and themes are where upgrades fail. Official PHP 8.6 support is planned for WordPress 7.2, scheduled for release on 8 December 2026, so test a staging copy first and read the PHP error log for deprecation notices before you switch the live site.
What is partial function application in PHP 8.6?
It lets you call a function with some arguments filled in and the rest replaced by a question-mark or three-dot placeholder. Instead of running the function, PHP returns a closure that waits for the missing arguments. It removes a lot of short fn() wrappers around array_map() and similar callbacks.
Should I upgrade production to PHP 8.6 on release day?
For most sites, no. Run PHP 8.5 in production, test PHP 8.6 on a staging copy, and switch once your plugins or Composer packages declare support and the first point release is out. Early adopters with a full test suite can move faster.
Last updated November 26, 2026
← All articles