Slide 150
Slide 150 text
S H O R T L I S T ( ) S Y N T A X : M U T U A L L Y E X C L U S I V E S Y N T A X
// This is not allowed:
list([$a, $b], [$c, $d]) = [[1, 2], [3, 4]];
// This is also not allowed:
[list($a, $b), list($c, $d)] = [[1, 2], [3, 4]];
// This, however, is allowed:
[[$a, $b], [$c, $d]] = [[1, 2], [3, 4]];
// This also:
list(list($a, $b), list($c, $d)) = [[1, 2], [3, 4]];