PHP RFCs

Accepted

Implemented

Property hooks

RFC StatusImplemented
TypeNew Feature
Version PHP 8.4
Created on / Last updated on

array_find

RFC StatusImplemented
TypeNew Feature
Version PHP 8.4
Created on / Last updated on

mb_str_pad

RFC StatusImplemented
TypeNew Feature
Version PHP 8.3
Created on / Last updated on

json_validate

RFC StatusImplemented
TypeNew Feature
Version PHP 8.3
Created on / Last updated on

Add true type

RFC StatusImplemented
TypeNew Feature
Version PHP 8.2
Created on / Last updated on

Readonly Classes

RFC StatusImplemented
TypeNew Feature
Version PHP 8.2
Created on / Last updated on

Deprecate dynamic properties

RFC StatusImplemented
TypeImprovement
Version PHP 8.2
Created on / Last updated on

When writing to a property that has not been declared, PHP will silently create a dynamic property instead. In modern code, this is rarely done intentionally. This RFC proposes to deprecate and later remove the creation of dynamic properties. stdClass and __get/__set are not affected by this change.

Deprecate autovivification on false

RFC StatusImplemented
TypeDeprecation
Created on / Last updated on

PHP natively allows for autovivification (auto-creation of arrays from falsey values). This feature is very useful and used in a lot of PHP projects, especially if the variable is undefined. However, there is a little oddity that allows creating an array from a false and null value.

The proposal is to disallow autovivification from false values

new in initializers

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

This RFC proposes to allow use of new expressions inside parameter default values, attribute arguments, static variable initializers and global constant initializers.

Fibers

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

Fibers is a new feature in PHP 8.1 that brings lightweight and controlled concurrency to PHP.

In essence, a Fiber is a code block that maintains its own stack (variables and state), that can be started, suspended, or terminated cooperatively by the main code and the Fiber.

Add fetch_column method to MySQLi

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

This RFC proposes to add a new fetch_column method to the mysqli_result class. With this new fetch_column method, it's possible to fetch a single field from a database query without having to fetch an object or an array of results.

MySQLi bind in execute

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

An RFC that proposes to improve the current MySQLi's mysqli_stmt::execute() method to work similar to the PDO's PDOStatement::execute().

The improved mysqli_stmt::execute() will accept an array of parameters that will be bound to the query, and will be more cleaner compared to the current workflow of calling mysqli_stmt::bind_param that requires parameters to be passed by reference.

Enumerations

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

An RFC to add Enumerations (Enums for short) to PHP.

Enums are enumerated types that has a fixed number of possible values. This RFC proposes to add an enum_exists function, two new interfaces for int/string-backed enums, and unit enums.

Phasing out Serializable

RFC StatusImplemented
TypeImprovement
Version PHP 8.1
Created on / Last updated on

The new custom object serialization mechanism RFC introduced new __serialize() and __unserialize() magic methods in PHP 7.4, with the intent of replacing the broken Serializable interface. This RFC finalizes that work by laying out a plan for the eventual removal of Serializable.

Static variables in inherited methods

RFC StatusImplemented
TypeImprovement
Version PHP 8.1
Created on / Last updated on

When a method containing static variables is inherited, the inherited method currently uses an independent set of static variables. This RFC proposes to only have one set of static variables per method.

never type

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

An RFC to add a new return type called noreturn (or never), that indicates the declared function/method does not return any value, and terminates the execution flow by throwing an exception, or terminating the request with a die/exit call.

A secondary vote to select the return type name, between noreturn and never concluded with never being the winner.

fsync() function

RFC StatusImplemented
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

fsync() is a function similar to fflush(), however where fflush() only instructs the application to flush its internal buffers out to the OS, fsync() further instructs the OS to flush its buffers to physical storage, ensuring a completed and persisted write before returning any success. PHP provides plain stream wrappers for most common file system functions inherited from C and is indeed one of few major languages to not provide any interface to fsync. This RFC proposes implementing fsync in core.

Declined

Static class

RFC StatusDeclined
TypeNew Feature
Version PHP 8.4
Created on / Last updated on

Sealed Classes

RFC StatusDeclined
TypeNew Feature
Version PHP 8.2
Created on / Last updated on

is_literal

RFC StatusDeclined
TypeNew Feature
Version PHP 8.1
Created on / Last updated on

Add the function is_literal(), a lightweight and effective way to identify if a string was written by a developer, removing the risk of a variable containing an Injection Vulnerability.

Partial Function Application

RFC StatusDeclined
TypeNew Feature
Created on / Last updated on

This proposal defines a syntax for partial function application in PHP. It has been designed to provide a maximum of functionality with a minimum of new syntax while avoiding, to the extent possible, confusing and non-obvious behavior.

Short Functions

RFC StatusDeclined
TypeNew Feature
Version PHP 8.1
Created on / Last updated on
Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.

Support PHP.Watch — If you find the articles, version information, Codex, and other PHP.Watch contributions useful, consider supporting through GitHub Sponsors. Your sponsorship helps dedicate more time to creating valuable content and improving the PHP community. Together, we can keep the momentum going — thank you for your support!

Thanks to the highest tier sponsor: @TomasVotruba for your generous support to keep PHP.Watch moving 💜