PHP Releases
Actively supported and previous versions of 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 8.4
    Bugfixes: 2026-12-31
    Security: 2028-12-31
    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
    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 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
Previous Versions
These versions no longer receive bugfix or security support from the PHP Project
Find out more about our support policy.
  • PHP 8.1
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
    This version is no longer supported.
    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
To Top