Hi, > -----Ursprüngliche Nachricht----- > Von: Stanislav Malyshev [mailto:smalys...@gmail.com] > Gesendet: Montag, 28. Dezember 2015 00:21 > An: Julian Rhind; internals@lists.php.net > Betreff: Re: [PHP-DEV] RFC proposal for alternative list syntax > > Hi! > > > // With the new array syntax this has been improved to > > > > list ($a, $b) = [1, 2]; > > > > // I think this new syntax should logically extend to > > > > [$a, $b] = [1, 2]; > > list() and array() are two different language constructs, using the same > syntax for them is a bad idea. > > -- > Stas Malyshev > smalys...@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: > http://www.php.net/unsub.php
To me it looks pretty much like pattern matching and I would like to see pattern matching in PHP. Maybe we need to add a little bit more syntax to distinguish it from normal array usage but I like the idea. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php