PHP's array is a single, mutable type that serves as an ordered list, an
associative map, a record and a set at once. That versatility means an array
type decla...
Inside a namespace, PHP resolves an unqualified function or constant name in the current namespace first, then falls back to the global namespace. Unqualified c...
PHP 8.4's asymmetric visibility (private(set) / protected(set)) is enforced by re-checking set access on every write: each assignment to an asymmetric property ...
This RFC proposes extension methods: the ability to declare additional methods for an existing class or interface from outside its definition, resolved at call ...
The Extension Methods RFC lets code declare additional methods for existing classes and interfaces, resolved only where PHP would otherwise raise an undefined-m...
The visibility RFC draws a line it inherits from every other use statement: importing is not loading. use extension Vendor\Name; grants visibility, but the decl...
The Extension Methods RFC gives extensions load-gated visibility: once a file declaring extension Target { } has executed, its methods are resolvable from anywh...
When a PHP program requests an allocation whose size the engine can compute before doing any work, the request ends in an uncatchable fatal error. Examples incl...
In modern web development, obfuscating or masking sensitive user data (such as credit card numbers, phone numbers, email addresses, and national IDs) is a daily...
The #[\Deprecated] attribute was introduced in PHP 8.4 (deprecated_attribute) and could be used to emit deprecation warnings when calling a function (or class m...
This RFC proposes to add a fallthrough; marker to switch to prevent accidental fallthrough, helping to avoid bugs while making intentional fallthrough visible a...
Sometimes, accessing path segments rather than the whole path as string is needed. When this is the case, splitting the path to segments manually after retrieva...
Attributes were first introduced in attributes_v2 in PHP 8.0, with the current syntax adopted shorter_attribute_syntax_change. Userland attributes provide a way...
PHP does not currently expose a small shared primitive for iterating over a string as UTF-8 code points. This RFC proposes such a primitive in the form of str_i...
The __sleep() and __wakeup() magic methods have been part of PHPs object serialization model since early versions.
However, they have long served multiple unr...
PHP already has a robust engine-level mechanism for forbidding serialization of certain types (e.g., closures, internal classes). This RFC proposes exposing tha...
In object-oriented code, composition generally means one object having a reference to another. In functional programming, composition generally means sticking ...
The original voting RFC allowed two audiences to vote, but because the original VCS account system has fallen out of use new accounts are not being added there,...
FFI::new(), FFI::type(), FFI::cast() support static and non-static access, which is very confusing. This issue has been proposed to be amended in the RFC that h...
Callables syntactically have few ways of passing them around.
This RFC is supposed to introduce unified short way of creating closures from callables
and reduce...
With the addition of type-checked function return values in PHP 7, we are one step closer to PHP being a gradually-typed language. This RFC proposes to close th...