On Mon, Dec 1, 2025 at 11:39 PM Larry Garfield <[email protected]> wrote:
> Hi folks. Ilija and I would like to present our latest RFC endeavor, > pattern matching: > > https://wiki.php.net/rfc/pattern-matching > > > Great work, very detailed and well written. 1. There are mentions that any type present in a function parameter signature and return value is a valid pattern matching. But are there any plans to extend the pattern-matching-syntax to parameter types and return values? Of course, with some restrictions: without variable pinning.And without variable binding on return type, but that could work on parameter types. If that's possible or already planned, I think it's worth mentioning it in the future scope section. 2. Maybe some parts of the RFC could be separated to reduce complexity. Thinking about variable pinning. 3. For match() "is" placement, I would go with the second form as it's more flexible, but I think allowing both forms might be nice if the complexity is not too high. Or go only with the second form now, and add the first form later in a smaller RFC. -- Alex
