Edit me on GitHub

PHP Features by version

Source
Version Active Support Ends Security Support Ends
8.3
8.4
8.5

Currently supported PHP versions

Name Links 8.38.48.5
Add #[Override] attribute RFC, Docs Y Y Y
Arbitrary static variable initializers RFC Y Y Y
Make unserialize() emit a warning for trailing data RFC Y Y Y
Dynamic class constant fetch RFC Y Y Y
Improve unserialize() error handling RFC Y Y Y
Updating readonly properties during clone RFC Y Y Y
Typed class cosntants RFC Y Y Y
Deprecate remains of string evaluated code assertions RFC Y Y Y
Add mb_str_pad function RFC, Docs Y Y Y
Warn on invalid operations with array_sum and array_product RFC Y Y Y
Warn or error for undefined range() usage RFC Y Y Y
Additions to Random\Randomizer; add Random\IntervalBoundary RFC Y Y Y
DateException and DateError RFC, Docs, Docs Y Y Y
Add json_validate function RFC, Docs Y Y Y
Use exceptions by default in SQLite3 extension RFC Y Y Y
Make GMP final RFC Y Y
More ext-dom features RFC Y Y
Stream opening functions for XML classes RFC Y Y
PDO driver-specific parsers RFC Y Y
Add array_find function RFC, Docs Y Y
Deprecate 0 ** -x RFC Y Y
Unbundle imap, pspell, and oci8 extensions RFC Y Y
Add StreamBucket class RFC Y Y
Opt-in DOM spec compliance RFC Y Y
Improve callbacks in ext-dom and ext-xsl RFC Y Y
Native PDO driver-specific subclasses RFC Y Y
New constants for round modes RFC Y Y
Add mb_trim, mb_ltrim, and mb_rtrim functions RFC, Docs, Docs, Docs Y Y
Raise BCrypt default cost from 10 to 12 RFC Y Y
Add XML_OPTION_PARSE_HUGE RFC Y Y
New JIT internals RFC Y Y
HTML5 DOM parsing and serialization RFC Y Y
Change JIT default INI values RFC Y Y
Add request_parse_body function (RFC1867 for non-POST verbs) RFC, Docs Y Y
Add http_get_last_response_headers and http_clear_last_response_headers functions RFC, Docs, Docs Y Y
Add mb_ucfirst and mb_lcfirst functions RFC, Docs, Docs Y Y
Add grapheme_str_split function (improve handling of strings with emojis) RFC, Docs Y Y
Add bcround, bcfloor, bcceil to BC Math RFC, Docs, Docs, Docs Y Y
Deprecate implicitly nullable parameters RFC Y Y
Support new MyClass()->method() without extra parentheses RFC Y Y
Add #[Deprecated] attribute and behavior RFC, Docs Y Y
Add property hooks RFC, Docs Y Y
Change rounding mode to enum RFC Y Y
Asymmetric visibility (public private(set) string $foo = 'bar';) RFC, Docs Y Y
Lazy object instantiation RFC, Docs Y Y
Turn exit into a function RFC Y Y
Soft-deprecate __sleep() and __wakeup() magic methods RFC Y
Warnings for PHP 8.5 RFC Y
Deprecations for PHP 8.5 RFC Y
Add locale for case insensitive grapheme functions RFC Y
Allow #[Deprecated] on traits RFC Y
Add FILTER_THROW_ON_FAILURE RFC Y
Add #[DelayedTargetValidation] attribute RFC Y
Make OPcache a non-optional part of PHP RFC Y
Customize properties during clone ("Clone with") RFC, Docs Y
Support final on property promotion RFC Y
Pipe operator (mixed |> callable) RFC, Docs Y
Support Attributes on Constants RFC Y
Grapheme cluster for levenshtein, grapheme_levenshtein function RFC Y
Asymmetric Visibility for Static Properties RFC Y
Add #[NoDiscard] attribute - marking return values as important RFC Y
Extend #[Override] to target properties RFC Y
Add get_error_handler() and get_exception_handler() functions RFC, Docs, Docs Y
Support Closures in constant expressions RFC Y
First Class Callables in constant expressions RFC Y
Persistent curl share handle improvement RFC Y
Fatal error backtraces, fatal_error_backtraces ini setting RFC Y
Change Directory class to behave like a resource object RFC Y
Add array_first() and array_last() RFC, Docs, Docs Y
Cookies Having Independent Partitioned State (CHIPS) RFC Y
Add RFC3986 and WHATWG URL compliant API RFC, Docs Y
TLS session resumption support for streams RFC Y

Next release (8.6)

Name Links
Add form feed (\f) to trim functions RFC
Add grapheme_strrev function RFC
Add clamp function RFC
Add isReadable/isWriteable Reflection methods RFC
Partial function application RFC
Partial function application — optional parameter handling RFC
Duration class RFC
Polling API RFC
Stream error handling improvements RFC
Allow object property writes on objects referenced by constants RFC
#[Override] for class constants RFC
Readonly property defaults RFC
DocComments for function parameters RFC
Debugable enums RFC
SortDirection enum RFC
Display function arguments in errors RFC
Closure optimizations (stateless closure caching) RFC
Secure session configuration defaults RFC
Add pack()/unpack() endianness modifiers for floating-point numbers RFC
Add pack()/unpack() endianness support for signed integers RFC
Add mysqli_quote_string function RFC
Add Locale::getDisplayKeyword and Locale::getDisplayKeywordValue RFC
Deprecate returning values from __construct() and __destruct() RFC
Limit maximum number of stream filter chains RFC
Deprecate mbregex functions (end of Oniguruma) RFC

Previously-introduced

Name Links Introduced
scalar types, strict_types=1 RFC, Docs 7.0
Native return types RFC, Docs 7.0
?? null coalesce operator RFC, Docs 7.0
Spaceship operator (<=>) RFC, Docs 7.0
constants containing arrays 7.0
anonymous classes RFC, Docs 7.0
Unicode string literals \u{0000aa} RFC 7.0
Group use imports RFC, Docs 7.0
Throwable type RFC, Docs 7.0
RNG functions random_bytes and random_int RFC, Docs, Docs 7.0
?nullable type RFC, Docs 7.1
void return type RFC, Docs 7.1
iterable RFC, Docs 7.1
Square bracket array destructuring - [$a, $b] = $array RFC 7.1
class constant visiblity RFC, Docs 7.1
Multiple catch types in one block - catch (A|B $e) RFC 7.1
keys in list() destructuring RFC 7.1
negative string offsets RFC 7.1
Async handling pcntl_async_signals function RFC, Docs 7.1
Native object typehint RFC, Docs 7.2
override abstract method in extension RFC 7.2
sodium in core RFC, Docs 7.2
argon2i pw hash RFC, Docs 7.2
LSP-compatible parameter type widening RFC 7.2
grouped namespace trailing comma RFC 7.2
Flexible Heredoc+Nowdoc RFC 7.3
References in array destructiring RFC 7.3
Function call trailing commas RFC 7.3
generally improved mbstring 7.3
JSON constant JSON_THROW_ON_ERROR RFC, Docs 7.3
is_countable function RFC, Docs 7.3
typed class properties RFC, Docs 7.4
Arrow functions (fn () => returnValue) RFC, Docs 7.4
improved covariance/contravariance RFC 7.4
Null coalesce equals operator - ??= RFC 7.4
Unpacking inside arrays RFC 7.4
Numeric literal separator - 1_000 RFC 7.4
Added WeakReference class RFC, Docs 7.4
FFI RFC, Docs 7.4
Opcache preload RFC, Docs 7.4
named arguments RFC, Docs 8.0
attributes - #[AttributeClass] RFC, Docs 8.0
constructor property promotion RFC, Docs 8.0
Union types - Union|Type RFC, Docs 8.0
match expression RFC, Docs 8.0
Nullsafe property access - ?-> RFC 8.0
WeakMap class RFC, Docs 8.0
wider application of variadic parameters 8.0
static return type RFC, Docs 8.0
get_class on object shorthand - $someObject::class RFC 8.0
Stringable interface RFC, Docs 8.0
abstract private mtehods in traits RFC 8.0
throw as expression RFC 8.0
paramter list trailing comma RFC 8.0
Non-capturing catches - catch (Type) RFC 8.0
Native mixed type RFC, Docs 8.0
removal of invalid enforcement of private method variance rules RFC 8.0
String functions str_starts_with and str_ends_with RFC, Docs, Docs 8.0
str_contains RFC, Docs 8.0
JIT RFC, Docs 8.0
get_debug_type function RFC, Docs 8.0
LSP enhancements RFC 8.0
closure use trailing comma RFC 8.0
JSON always available RFC 8.0
Octal literal prefix - 0o14 RFC 8.1
array unpack with string keys RFC 8.1
named arg in fn call unpack 8.1
enumerations RFC, Docs 8.1
fibers RFC, Docs 8.1
first-class callables - $s = strlen(...) instead of $s = fn ($str) => strlen($str) RFC, Docs 8.1
Intersection types A & B & C RFC, Docs 8.1
Native never return type RFC, Docs 8.1
new in initializers - __construct(?Foo $foo = new Foo()) RFC 8.1
readonly properties RFC, Docs 8.1
Class constants can be final RFC 8.1
array_is_list function RFC, Docs 8.1
$GLOBALS restrictions RFC 8.1
Internal method return types RFC 8.1
Add attribute #[SensitiveParameter] RFC, Docs 8.2
Deprecate dynamic properties; add #[AllowDynamicProperties] attribute RFC, Docs 8.2
enum reads in const expressions RFC 8.2
standalone true type RFC 8.2
standalone null and false types RFC 8.2
Disjunctive Normal Form types - (A&B)|C RFC, Docs 8.2
constants in traits RFC 8.2
readonly classes RFC, Docs 8.2