PHP 8.6 helps you write less code and ship safer apps. Turn function calls into closures with partial function application, drop constructor boilerplate with readonly property defaults, and replace hand-written helpers with clamp() and the new Duration class. Sessions now use secure defaults out of the box.
What's changing in PHP 9Sources: W3Techs and Packagist, October 2026.
What's new
Less glue code, fewer hand-written helpers and safer defaults. Each feature links to its documentation in the PHP manual.
Use ? and ... placeholders to turn any function call into a closure, perfect for array_map() and the pipe operator.
str_replace('hello', 'hi', ?) The new clamp() function keeps a value within a range, and throws a ValueError when the range itself is invalid.
clamp($percentage, min: 0, max: 100) The new immutable Time\Duration class represents a span of time with nanosecond precision, instead of loose integers and floats.
Duration::fromMilliseconds(100) Readonly properties can now declare a default value, removing boilerplate constructor assignments.
public readonly int $value = 1; The #[\Override] attribute now also works on class constants and enum cases, catching typos and stale overrides.
#[\Override] const C = 'Changed'; Sessions now use strict mode, HttpOnly cookies and SameSite=Lax out of the box.
session_start(); // secure by default Road to PHP 9
PHP 9.0 doesn't have a release date yet, and PHP 8.7 is already in development. But many of the changes PHP 9 will bring have already been voted on, and each one is announced today as a deprecation or a warning, so you can prepare at your own pace.
PHP 8.5
Released Nov 20, 2025
PHP 8.6
Released Nov 19, 2026
PHP 8.7
In development
PHP 9.0
No release date yet
Error Warning since 8.0 Error Warning since 8.0 "${var}" string interpolation is removed Deprecated since 8.2 int $id = null are removed Deprecated since 8.4 false to an array throws an Error Deprecated since 8.1 ++ on non-numeric strings throws a TypeError Deprecated since 8.5 Serializable interface is removed Deprecated since 8.1 Report every error with E_ALL in development and fix deprecations as they appear. PHPStan, Psalm and Rector do most of the work.
$name = 'PHP';
function find(int $id = null) {}
// Deprecated: find(): Implicitly marking parameter $id as nullable is deprecated, the explicit nullable type must be used instead
echo "Hello ${name}";
// Deprecated: Using ${var} in strings is deprecated, use {$var} instead $name = 'PHP';
function find(?int $id = null) {}
echo "Hello {$name}"; Ecosystem
The most used frameworks and the largest open source projects are built with PHP, backed by tools the whole community relies on.
The most used PHP framework, chosen by 64% of PHP developers.
A full-stack framework whose components also power Laravel.
The CMS behind 39.6% of all websites, from blogs to nasa.gov.
The CMS of choice for governments and large enterprises.
A lightweight framework known for speed and a tiny footprint.
A fast, component-based framework for modern web applications.
The open source learning platform used by 500 million people.
The open source e-commerce platform behind 230,000 stores.
Dependencies, testing, analysis and runtime, built by the community.
Release cycle
Each release is actively supported for two years, then receives security fixes for two more.
PHP 8.6
Security fixes until 31 Dec 2030
PHP 8.5
Security fixes until 31 Dec 2029
PHP 8.4
Security fixes until 31 Dec 2028
PHP 8.3
Security fixes until 31 Dec 2027
PHP 8.2
Security fixes until 31 Dec 2026
The PHP Foundation
The PHP Foundation is a collective of people and organizations, united in the mission to ensure the long-term prosperity of the PHP language. Sponsorships fund the engineers who maintain PHP, review contributions, harden its security, and build what comes next.
Is your company built on PHP?
Company sponsorships start at $1,000 a month and put your logo in front of the PHP community.
See sponsorship tiersFor source downloads of PHP 8.6 please visit the downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog.
The migration guide is available in the PHP Manual. Please consult it for a detailed list of new features and backward-incompatible changes.