PHP: rfc:pattern-matching
The RFC proposes introducing a pattern matching syntax to PHP, allowing variables to be matched against complex data structure patterns and optionally extracting values. This functionality aims to provide more readable and compact code. The document covers various patterns like type, literal, class constant, object property, and array structure patterns, detailing how they would be implemented and used. Additionally, it explores optional and future patterns that could be included to enhance PHP's capability further.