Open RFCs

Bound-Erased Generic Types

This RFC adds generic type syntax to PHP. Classes, interfaces, traits, functions, methods, closures, and arrow functions can declare type parameters; those parameters carry bounds, defaults, and variance markers; type arguments may be supplied at use sites and at call sites via turbofish.

98% 2%
24
40 yes
1 no
Asymmetric Visibility v2

A new syntax for declaring the “set” operation visibility of an object property

34% 66%
23
21 yes
40 no
new MyClass()->method() without parentheses

Chain method on newly created objects without parentheses

86% 14%
55
96 yes
16 no

Argument of the Day

6

I don't often use generic definitions in docblocks today, but when I do, it's a mess. I think this RFC is the right move at the right time, and cost (both runtime and syntax) appears zero to minimal at best. It'd be really great to see generics land in PHP. It's been a long time coming.

Share:
Read the RFC: Bound-Erased Generic Types mikerockett avatar
mikerockett
voted yes
RSS Feed Contribute Watch on YouTube Our License
© 2026 RFC Vote. This project is open source. Contribute and collaborate with us!