RFC proposal for alternative list syntax
| From: | Julian Rhind | Date: | Sun, 27 Dec 2015 19:58:41 +0000 |
| Subject: | RFC proposal for alternative list syntax | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-89899@lists.php.net to get a copy of this message | ||
Hi
I have a proposal for new alternative syntax for list
// In the old days we did this
list ($a, $b) = array (1, 2);
// 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];
Regards
Julian
Julian Rhind