Hi,
- It has been requested several times on this list to stop using the wording "type hint" and instead write "type declaration" ;)
I've updated the RFC to use the "type declaration" wording, thanks for the hint :)
- When I see this example in the RFC: ``` $years = [["now", 2020], ["future", 2021]]; foreach ($years as [string $description, int $year]) { ``` I immediately think of a similar: ``` $years = ["now" => 2020, "future" => 2021]; foreach ($years as string $description => int $year) { ``` or: ``` $foos = [new Foo("one"), new Foo("two")]; foreach ($foos as Foo $foo) { ```
As the RFC tackles array destructuring expressions and not foreach loops (which is just an option to use array destructuring there) I think this is out of scope for the RFC. I've added it to the future scope section though as I think it would align with the current proposal. Thanks for the input! Cheers, Enno -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php