Less Boilerplate. Safer Defaults.

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 9
of websites with a known server-side language run PHP
69.3%
of all websites are built with WordPress
39.6%
open source packages on Packagist
475,000+
package installs with Composer since 2012
207B

Sources: W3Techs and Packagist, October 2026.

Behind the sites and apps millions of people use every day

What's new

Key Features in PHP 8.6

Less glue code, fewer hand-written helpers and safer defaults. Each feature links to its documentation in the PHP manual.

Partial Function Application

Use ? and ... placeholders to turn any function call into a closure, perfect for array_map() and the pipe operator.

str_replace('hello', 'hi', ?)
clamp() Function

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)
Duration Class

The new immutable Time\Duration class represents a span of time with nanosecond precision, instead of loose integers and floats.

Duration::fromMilliseconds(100)
Readonly Property Defaults

Readonly properties can now declare a default value, removing boilerplate constructor assignments.

public readonly int $value = 1;
#[\Override] for Constants

The #[\Override] attribute now also works on class constants and enum cases, catching typos and stale overrides.

#[\Override] const C = 'Changed';
Secure Session Defaults

Sessions now use strict mode, HttpOnly cookies and SameSite=Lax out of the box.

session_start(); // secure by default

Read the PHP 8.6 migration guide

Road to PHP 9

Today's deprecations are tomorrow's errors.

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.

  1. PHP 8.5

    Released Nov 20, 2025

  2. PHP 8.6

    Released Nov 19, 2026

  3. PHP 8.7

    In development

  4. PHP 9.0

    No release date yet

Already accepted for PHP 9.0

  • Reading an undefined variable throws an Error Warning since 8.0
  • Reading an undefined property throws an Error Warning since 8.0
  • "${var}" string interpolation is removed Deprecated since 8.2
  • Implicitly nullable types like int $id = null are removed Deprecated since 8.4
  • Converting false to an array throws an Error Deprecated since 8.1
  • ++ on non-numeric strings throws a TypeError Deprecated since 8.5
  • The Serializable interface is removed Deprecated since 8.1
  • Session IDs in URLs and forms are no longer supported Deprecated since 8.4
  • Features deprecated in PHP 8.6 are removed Deprecated in 8.6

Fix it today

Report every error with E_ALL in development and fix deprecations as they appear. PHPStan, Psalm and Rector do most of the work.

Deprecated in PHP 8
$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
Ready for PHP 9
$name = 'PHP';

function find(?int $id = null) {}

echo "Hello {$name}";
Read the accepted RFCs

Ecosystem

Build on a Thriving Ecosystem

The most used frameworks and the largest open source projects are built with PHP, backed by tools the whole community relies on.

Essential tools

Dependencies, testing, analysis and runtime, built by the community.

Release cycle

Supported Versions

Each release is actively supported for two years, then receives security fixes for two more.

The PHP Foundation

Invest in the language your business runs on.

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.

engineers funded
13
of core commits in 2025
~42%
sponsors in 2025
536
  • Shipped PIE 1.0, the new installer for PHP extensions
  • Completed an independent security audit of PHP’s core
  • Brought FrankenPHP under the official PHP organization
  • Launched an Ecosystem Security Team

Thank you to our sponsors

Platinum

  • JetBrains
  • Automattic
  • Sovereign Tech Agency
  • Alpha-Omega

Gold

  • GoDaddy.com
  • team.blue

Silver

  • Private Packagist
  • Craft CMS
  • Zend by Perforce
  • Tideways
  • Symfony Corp
  • Mercari Inc.
  • Les-Tilleuls.coop
  • pixiv Inc.
  • Aternos GmbH
  • Sentry
  • Team Cybozu
  • Manychat
  • Passbolt
  • CH Studio
  • TYPO3

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 tiers

Better performance, better syntax, improved type safety.

For 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.