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

Lets code add methods to existing classes and interfaces from outside their definition, Swift-style.

Last activity

Extends extension methods to built-in types like string, int and array.

Last activity

str_mask()

Draft

Adds str_mask() for masking phone numbers, card numbers and other sensitive strings.

PHP 8.7

Last activity

Adds a fallthrough; marker to switch and warns when a non-empty case falls through to the next one without it.

PHP 8.6

Last activity

Adds path segment accessors to the URI extension so paths no longer need splitting by hand.

PHP 8.6

Last activity

Adds a #[\NonExhaustive] attribute that marks an enum as likely to gain cases, so code matching on it knows to handle unknown ones.

PHP 8.6

Last activity

Adds a SORT_STRICT flag to sort(), ksort(), array_unique() and friends that orders values by type first, with no type juggling.

Last activity

Adds a #[\NotSerializable] attribute that makes the engine refuse to serialize() or unserialize() instances of a class.

PHP 8.6

Last activity

Array Search Range

Withdrawn

Adds array_search_range() to search for a value within a slice of an array.

PHP 8.6

Last activity

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

Requires autoconf 2.71 to build PHP 8.6 from git, and MySQL 5.7.3 or MariaDB 10.2.4 for persistent connections.

PHP 8.6

Last activity

Lets readonly properties declare default values, so a class can meet a get-only interface property with a fixed value.

PHP 8.6

Last activity