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

Clone with v2

Implemented

Lets clone() take an array of properties to change on the copy, so you can update readonly properties in with-er methods.

PHP 8.5

Last activity

Lets you mark a promoted constructor parameter as final, making the promoted property final without extra boilerplate.

PHP 8.5

Last activity

Adds ? and ... placeholders to function calls, so passing only some arguments returns a closure that takes the rest later.

PHP 8.6

Last activity

Pipe operator

Implemented

Adds the |> pipe operator, which passes the value on its left as the single argument to the callable on its right.

PHP 8.5

Last activity

Adds an always-on URI extension with Uri\Rfc3986\Uri and Uri\WhatWg\Url classes for standards-compliant URL parsing, instead of parse_url().

PHP 8.5

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

Updates the PHP release policy to define BC breaks, clarify what each version type may change, and let most features land via pull request.

Last activity

Adds array_first() and array_last() to return an array's first and last values, or null when the array is empty.

PHP 8.5

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

Sets out which backward compatibility breaks are allowed in a PHP minor release, and which have to wait for a major one.

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