Skip to content
PHP News
Search

The future of PHP

RFC Tracker

Follow the proposals shaping the next version of PHP.

44
Under discussion
02
In voting
33
Accepted this year
09
Declined this year

Closure optimizations

Implemented

Makes closures cheaper by inferring static when $this is unused and caching stateless closures, though only the caching part was merged.

PHP 8.6

Last activity

Adds the form feed character (\f) to the default set of characters that trim(), ltrim() and rtrim() strip.

PHP 8.6

Last activity

Adds mysqli::quote_string(), which escapes a string and wraps it in single quotes, like PDO::quote(), to close a double-quote injection hole.

PHP 8.6

Last activity

Adds exception and silent modes for stream errors, with structured StreamError objects and a StreamErrorCode enum you can inspect.

PHP 8.6

Last activity

Adds a clamp() function that returns a value if it falls between min and max, or the nearest bound if it doesn't.

PHP 8.6

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

Adds ReflectionProperty::isReadable() and isWritable() so you can check whether a property can be read or written from a given scope.

PHP 8.6

Last activity