On 29 September 2026 18:44:07 BST, Weilin Du <[email protected]> wrote:
>Hi folks!
>
>Today, I want to announce my second RFC to php 8.7
>https://wiki.php.net/rfc/array_shorthand
>
>This RFC brings a IMO useful syntactic sugar to array's
>construction and destruction. I hope you'all find this
>interesting! To be short:
>
>```
>$point = [:$x, :$y, :$z]; // ['x' -> $x, 'y' -> $y, 'z' -> $z]
>[:$x, :$y, :$z] = $point; // reverse.
>```


You might be interested in Nikita's thoughts on this back when named parameters 
were added: https://wiki.php.net/rfc/named_params#future_scope

Even if it's only applied to arrays initially, it's useful to consider how the 
syntax fits with both existing and future features.



Rowan Tommins
[IMSoP]

Reply via email to