Skip to content
PHP News
Search

The future of PHP

RFC Tracker

Follow the proposals shaping the next version of PHP.

35
Under discussion
00
In voting
30
Accepted this year
09
Declined this year

Adds a |>= operator so $x |>= trim(...) pipes a variable through a function and assigns the result back.

PHP 8.6

Last activity

Function autoloading modeled on class autoloading, with no cost to calls that resolve normally.

PHP 8.6

Last activity

Adds native generic syntax to classes and functions, with bounds, defaults and variance, erased to each parameter's bound at runtime.

Last activity

Adds array_only_keys() and array_except_keys() to keep or drop the listed keys of an array without the array_flip() workaround.

PHP 8.6

Last activity

Adds six str_prefix_* and str_suffix_* functions to ensure, remove or replace a string's prefix or suffix in one call.

PHP 8.6

Last activity

Adds split() as an alias of explode(), matching the name most other languages use for breaking a string into an array.

Last activity

Lets backed readonly properties use get and set hooks, with a separate vote for each kind of hook.

Last activity

Lets named functions and methods use => expression; as a shorthand for a body that only returns that expression.

Last activity

Nested Classes

Declined

Lets you declare classes and enums inside other classes, with public, protected or private visibility, referenced as Outer\Inner.

Last activity

Lets interface and abstract methods use never as a parameter type, so implementations can pick any type, and uses it for BackedEnum::from().

Last activity

Lets a class mark an interface with ? in its implements list, so it only implements that interface if it exists.

Last activity

Adds mb_levenshtein() to mbstring so the Levenshtein edit distance is counted in Unicode code points instead of bytes.

Last activity

Adds a let() construct that scopes variables to a block and restores or unsets them when it ends, even if an exception is thrown.

Last activity