Download
Download Latest
Version Support Policy
Documentation
Documentation Home
Tutorial
Project
Governance
Branding
License
GitHub Repository
Community
Contribute to PHP
Online Communities
Events | Conferences
Mailing Lists
PHP 8.5
All Releases
Search docs
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Exceptions
Generators
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Filesystem Security
Database Security
Error Reporting
Using Register Globals
User Submitted Data
Magic Quotes
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Safe Mode
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Credit Card Processing
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
PHP Releases
Actively supported and previous versions of PHP
8.5.7
Migration Guide
Bugfixes:
2027-12-31
Security:
2029-12-31
Find Out More About PHP 8.5
Download Now
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
8.4.22
Migration Guide
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
Discover More
Download
PHP 8.3
8.3.31
Migration Guide
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
Discover More
Download
PHP 8.2
8.2.31
Migration Guide
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
Discover More
Download
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
8.1.34
Migration Guide
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
Discover More
Download
PHP 8.0
8.0.30
Migration Guide
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
Discover More
Download
PHP 7.4
7.4.33
Migration Guide
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 ...
Discover More
Download
PHP 7.3
7.3.33
Migration Guide
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
Discover More
Download
PHP 7.2
7.2.34
Migration Guide
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
Discover More
Download
PHP 7.1
7.1.33
Migration Guide
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
Discover More
Download
PHP 7.0
7.0.33
Migration Guide
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
Discover More
Download
PHP 5.6
5.6.40
Migration Guide
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
Discover More
Download
PHP 5.5
5.5.38
Migration Guide
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
Discover More
Download
PHP 5.4
5.4.45
Migration Guide
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
Discover More
Download
PHP 5.3
5.3.29
Migration Guide
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
Discover More
Download
PHP 5.2
5.2.17
Migration Guide
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
Discover More
Download
PHP 5.1
5.1.6
Migration Guide
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
Discover More
Download
PHP 5.0
5.0.5
Migration Guide
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
Discover More
Download
PHP 4.4
4.4.9
Migration Guide
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
Discover More
Download
PHP 4.3
4.3.11
Migration Guide
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
Discover More
Download
PHP 4.2
4.2.3
Migration Guide
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
Discover More
Download
PHP 4.1
4.1.2
Migration Guide
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
Discover More
Download
PHP 4.0
4.0.6
Migration Guide
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
Discover More
Download
↑
and
↓
to navigate •
Enter
to select •
Esc
to close •
/
to open
Press
Enter
without selection to search using Google