Home » Releases »

Releases

Versions of the PHP Engine
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 8.4
Major Features:
  • Property Hooks allow intercepting properties
  • Asymmetric Visibility for get and set
  • #[Deprecated] attribute signals removal intent
  • new array lookup and query options
PHP 8.3
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 8.2
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

Older Versions

These versions are no longer officially supported by the PHP Project

Official support refers to that provided direct by the PHP Project.

If you install PHP via third-party packages, support timelines may be different. Please read the Release Support Policy for more information.

PHP 8.1
Major Features:
  • Native support for Enumerations
  • Core support for asynchronous programming
  • class properties can be permanently marked readonly
  • Clean syntax for creating closures from callables
PHP 8.0
Major Features:
  • Pass arguments to functions based on parameter names
  • Native syntax for structured metadata(annotations)
  • Shorthand syntax for defining and initializing properties
  • Strict, expression - based alternative to switch statements
PHP 7.4
Major Features:
  • class properties fully support type declarations
  • Concise syntax for simple one - liner closures
  • Assign values quickly using the ??= operator
  • Unpack arrays directly inside other arrays using ...
PHP 7.3
Major Features:
  • Improved formatting and indentation parsing for multi - line strings
  • Allow trailing commas in function calls
  • list destructuring supports assignment by reference
  • new function to safely verify if a variable is countable
PHP 7.2
Major Features:
  • use 'object' as a formal type declaration
  • Native support for the Argon2 password hashing algorithm
  • Modern cryptography via the core Sodium extension
  • Traits can now be overridden by abstract methods
PHP 7.1
Major Features:
  • Prepend types with a question mark to allow nulls
  • Functions can explicitly declare a 'void' return
  • Accept arrays or Traversable objects interchangeably
  • Catch multiple exception types within a single block
PHP 7.0
Major Features:
  • Type hinting for int, float, string, and bool
  • Specify the strict return type of a function
  • Simplify isset checks with the ?? operator
  • Combined comparison using the <=> operator
PHP 5.6
Major Features:
  • Accept variable-length argument lists using ...
  • Unpack arrays dynamically into function arguments
  • Use basic math and expressions when defining constants
  • Calculate powers easily using the ** operator
PHP 5.5
Major Features:
  • Create simple iterators using the 'yield' keyword
  • Execute code unconditionally after try/catch blocks
  • Fetch fully qualified class names as strings
  • The empty() construct now accepts arbitrary expressions
PHP 5.4
Major Features:
  • Enable horizontal code reuse across independent classes
  • Define arrays cleanly using the [] syntax
  • Integrated CLI web server for local development
  • Anonymous functions can automatically access object scope
PHP 5.3
Major Features:
  • Organize code and prevent naming collisions
  • Reference the called class context using static::
  • Support for anonymous functions and inline callbacks
  • Omit the middle expression using the ?: operator
PHP 5.2
Major Features:
  • Native json_encode and json_decode functions added
  • Built-in data validation and sanitization filters
  • Native support for creating and reading ZIP archives
  • Introduction of the object-oriented DateTime class
PHP 5.1
Major Features:
  • Standardized, lightweight interface for database access
  • Significant execution speed improvements over 5.0
  • Added support for __isset() and __unset()
  • Allow 'array' as an explicit parameter type hint
PHP 5.0
Major Features:
  • A completely rewritten core engine for better performance
  • Introduction of true OOP with visibility (public/protected/private)
  • Standardized try/catch error handling model
  • An easy-to-use extension for parsing XML structures
PHP 4.4
Major Features:
  • Fixed major memory corruption issues related to references
  • Added an INI directive to limit the nesting level of input variables
  • File hashing functions now use streams instead of low-level IO
  • Added flag to sort arrays based on the current locale
PHP 4.3
Major Features:
  • Introduced a separate CLI SAPI for developing shell applications
  • Unified approach to handling files, pipes, sockets, and I/O resources
  • The GD image manipulation library is now bundled by default
  • A more portable and less resource-consuming build process
PHP 4.2
Major Features:
  • External variables are no longer registered in the global scope by default
  • Major overhaul of the sockets extension for better reliability
  • Highly improved performance and handling of file uploads
  • Introduced experimental support for the Apache 2 web server
PHP 4.1
Major Features:
  • Introduced autoglobal arrays like $_GET, $_POST, and $_SESSION
  • Revolutionary performance and stability improvements under Windows
  • Added turn-key output compression support
  • Added infrastructure to support version numbers for different extensions
PHP 4.0
Major Features:
  • A new, highly optimized two-stage parse and execute engine
  • Built-in support for HTTP session management
  • Ability to buffer output before sending it to the browser
  • More comprehensive object-oriented programming support over PHP 3