php
Bugfixes: 2027-12-31
Security: 2029-12-31
Major Features
URI Extension
PHP 8.5 adds a built-in URI extension to parse, normalize, and handle URLs following RFC 3986 and WHATWG URL standards.
Pipe Operator
The |> operator enables chaining callables left-to-right, passing values smoothly through multiple functions without intermediary variables.
Clone With
Clone objects and update properties with the new clone() syntax, making the "with-er" pattern simple for readonly classes.
#[\NoDiscard] Attribute
The #[\NoDiscard] attribute warns when a return value isn’t used, helping prevent mistakes and improving overall API safety.
Closures and First-Class Callables in Constant Expressions
Static closures and first-class callables can now be used in constant expressions, such as attribute parameters.
Persistent cURL Share Handles
Handles can now be persisted across multiple PHP requests, avoiding the cost of repeated connection initialization to the same hosts.
  • PHP version 8.4
    Bugfixes: 2026-12-31
    Security: 2028-12-31
    Major Features:
    • Property Hooks allow intercepting properties
    • Asymmetric Visibility for get and set
    • #[Depreciated] attribute signals removal intent
    • New array lookup and query options
  • PHP version 8.3
    Bugfixes: End of Life
    Security: 2027-12-31
    Major Features:
    • Class constants can now be typed
    • Dynamic Class Constants
    • Enhanced deep cloning of readonly instances
    • Generate random strings from provided character sets
  • PHP version 8.2
    Bugfixes: End of Life
    Security: 2026-12-31
    Major Features:
    • Entire classes can now be marked Readonly
    • Improved type support with Disjunction Normal Forms
    • Null, true and false are now usable as types
PHP Foundation Logo
The PHP Foundation is a collective of people and organizations, united in the mission to ensure the long-term prosperity of the PHP language.

Learn About the PHP Foundation  ·  Donate Via Open Collective  ·  Donate Via GitHub
The PHP Foundation is grateful for our many sponsors, including:
Composer Logo
PHP has one of the largest collections of open-source libraries in the world.

Ranging from individual helpers to entire application frameworks, all packages are easily installable via the Composer package manager.

Get Composer  ·  Browse Package Repository
PHP

My PHP.net Downloads Contact Other PHP.net sites
Learn

Documentation Get Involved Help
The PHP Foundation

About the Foundation Sponsor Contact
Legal

Privacy Policy
To Top