PHP: rfc:generic-arrays
PHP lacks support for generics, posing challenges for typed arrays which are essential for frameworks and tools relying on precise type definitions. The proposal aims to introduce a native solution for typed arrays using syntax like `array<Type>` to enhance both runtime type-checking and IDE support for array types. This proposal ensures compatibility with potential future generic additions and provides various examples to demonstrate the behaviors and principles of typed arrays, such as value-passing, type-casting, nesting, and interaction with existing PHP type systems. Performance impacts and future optimizations are also considered.