1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-13 01:47:22 +01:00
PHP-Parser/test/code/prettyPrinter/expr/arrayDestructuring.test

14 lines
246 B
Plaintext
Raw Normal View History

Array destructuring
-----
<?php
[$a, $b] = [$c, $d];
[, $a, , , $b, ,] = $foo;
[, [[$a]], $b] = $bar;
['a' => $b, 'b' => $a] = $baz;
-----
!!php7
[$a, $b] = [$c, $d];
[, $a, , , $b, ] = $foo;
[, [[$a]], $b] = $bar;
['a' => $b, 'b' => $a] = $baz;