PHP 8.6 is out. Do not put your Moodle on it yet
PHP 8.6.0 came out on 19 November 2026. No Moodle supports it and 8.5 support is unfinished. What changed, what to pin, and what plugin developers can do now.
Short answer: PHP 8.6.0 was released on 19 November 2026.1 No version of Moodle supports it, and Moodle has not finished supporting PHP 8.5 either. Keep Moodle servers on PHP 8.3 or 8.4, and pin that version anywhere it could change on its own, such as container images and hosting control panels.
We covered what was coming in 8.6 in our preview on 9 November. This is the follow-up now that the release is real.
What is in PHP 8.6?
The release page leads with six features:1
- Partial function application. Give a function some of its arguments now and get back a closure that takes the rest. It pairs with the pipe operator from 8.5.
- A
\Time\Durationclass for elapsed time, with nanosecond precision. - A polling API for watching many streams at once, without the limits of
stream_select(). clamp(), which forces a value into a range.- A
SortDirectionenum withAscendingandDescending, a shared way to say which way to sort. - Default values for readonly properties.
It is also the first PHP released under the Modified BSD license, as we explained in the preview.
What breaks in old plugin code?
Nothing stops running, but a lot of code gets louder. The release page lists these among the deprecations and changes:1
| Change | What to do in plugin code |
|---|---|
is_integer(), is_long(), is_double(), doubleval() deprecated | Use is_int(), is_float(), floatval() |
spl_object_hash() deprecated | Use spl_object_id() |
mb_ereg(), mb_split() and the other mbstring regex functions deprecated | Use preg_* with the u modifier |
strcoll() and SORT_LOCALE_STRING deprecated | Use the intl Collator class (Moodle’s core_collator already wraps it) |
return inside finally, or a value returned from __construct() | Remove it |
Session defaults: strict mode and HttpOnly on, SameSite Lax | Test SSO and anything that posts across sites |
trim() now also strips form feed (\f) | Rarely matters; check parsers of odd input |
Many functions throw ValueError for bad values instead of warning | Check code that relied on a warning and a false |
The ValueError change is the one most likely to turn a notice into a fatal error in old code. Everything else is log noise until a future major version removes it.
Which Moodle can run PHP 8.6?
None. Moodle’s PHP policy page, last updated on 15 September 2026, does not mention 8.6 at all. It lists PHP 8.4 as the newest version in normal use, from Moodle 5.0, and PHP 8.5 under “versions under development”, “only for development purposes”.2
The tracker shows where 8.5 stands. The epic MDL-84684, “Prepare Moodle for PHP 8.5”, is still open, updated on 12 November. On 19 November, 7 of its 15 subtasks were closed. The rest were in review, in development or not started, including the move away from the __sleep() and __wakeup() methods that 8.5 soft-deprecates.3
On 19 November, a tracker search for issues with “PHP 8.6” in the title found only one: MDL-89416, about the backtick shell operator in moodlelib.php, opened in August and closed as a duplicate.4 There is no PHP 8.6 epic yet.
Our estimate, unchanged since the preview: Moodle supports 8.5 in a 2027 release, and 8.6 comes after that. Plan on PHP 8.4 for Moodle through 2027. That is our reading of the tracker, not a Moodle commitment.
What should a Moodle site do this week?
- Pin your PHP version. Container images and some hosting panels follow the newest PHP unless you name a version. If your Moodle runs in Docker, use a tag with the minor version, such as
php:8.4-apache, notlatestor8. - Check what your host will do. Managed hosts usually offer new PHP versions as an option first. Make sure nobody switches your Moodle site to 8.6 to “stay current”.
- Keep taking 8.3 and 8.4 updates. PHP 8.4 gets bug fixes until 31 December 2026 and security fixes until 31 December 2028. PHP 8.3 gets security fixes until 31 December 2027.5 PHP 8.2 reaches end of life on 31 December 2026, so a Moodle 4.5 site still on 8.2 should move to 8.3 now.
What should plugin developers do?
Run your plugin’s tests on PHP 8.6 now, as a job that is allowed to fail, and fix the deprecations while they are cheap. Our preview post has the CI and grep checklist. Keep plugin code on the PHP syntax of the oldest Moodle you support: for Moodle 5.2 and 5.3 that is PHP 8.3, so partial application and the pipe operator stay out of plugin code for years.
If a plugin of yours is stuck on old PHP and blocks an upgrade, we update plugins at a fixed price.
Sources
-
PHP Group, PHP 8.6.0 Release Announcement, 19 November 2026. ↑ ↑ ↑
-
Moodle HQ, PHP policy page, last updated 15 September 2026, read 19 November 2026. ↑
-
Moodle Tracker, MDL-84684: Prepare Moodle for PHP 8.5 and its subtasks, read 19 November 2026. ↑
-
Moodle Tracker, MDL-89416: PHP 8.6 deprecation: Replace backtick execution operator with shell_exec() in moodlelib.php, closed as a duplicate on 16 August 2026. ↑
-
PHP Group, Supported versions, read 19 November 2026. ↑
Need a Moodle plugin built or rescued?
Tell the scoping assistant what you need. You get a fixed price and a timeline in a few minutes, and an engineer reviews it within one business day.
Get a fixed quote