1Array destructuring 2----- 3<?php 4 5[$a, $b] = [$c, $d]; 6[, $a, , , $b, ,] = $foo; 7[, [[$a, , $x]], $b] = $bar; 8['a' => $b, 'b' => $a] = $baz; 9----- 10array( 11 0: Stmt_Expression( 12 expr: Expr_Assign( 13 var: Expr_List( 14 items: array( 15 0: ArrayItem( 16 key: null 17 value: Expr_Variable( 18 name: a 19 ) 20 byRef: false 21 unpack: false 22 ) 23 1: ArrayItem( 24 key: null 25 value: Expr_Variable( 26 name: b 27 ) 28 byRef: false 29 unpack: false 30 ) 31 ) 32 ) 33 expr: Expr_Array( 34 items: array( 35 0: ArrayItem( 36 key: null 37 value: Expr_Variable( 38 name: c 39 ) 40 byRef: false 41 unpack: false 42 ) 43 1: ArrayItem( 44 key: null 45 value: Expr_Variable( 46 name: d 47 ) 48 byRef: false 49 unpack: false 50 ) 51 ) 52 ) 53 ) 54 ) 55 1: Stmt_Expression( 56 expr: Expr_Assign( 57 var: Expr_List( 58 items: array( 59 0: null 60 1: ArrayItem( 61 key: null 62 value: Expr_Variable( 63 name: a 64 ) 65 byRef: false 66 unpack: false 67 ) 68 2: null 69 3: null 70 4: ArrayItem( 71 key: null 72 value: Expr_Variable( 73 name: b 74 ) 75 byRef: false 76 unpack: false 77 ) 78 5: null 79 ) 80 ) 81 expr: Expr_Variable( 82 name: foo 83 ) 84 ) 85 ) 86 2: Stmt_Expression( 87 expr: Expr_Assign( 88 var: Expr_List( 89 items: array( 90 0: null 91 1: ArrayItem( 92 key: null 93 value: Expr_List( 94 items: array( 95 0: ArrayItem( 96 key: null 97 value: Expr_List( 98 items: array( 99 0: ArrayItem( 100 key: null 101 value: Expr_Variable( 102 name: a 103 ) 104 byRef: false 105 unpack: false 106 ) 107 1: null 108 2: ArrayItem( 109 key: null 110 value: Expr_Variable( 111 name: x 112 ) 113 byRef: false 114 unpack: false 115 ) 116 ) 117 ) 118 byRef: false 119 unpack: false 120 ) 121 ) 122 ) 123 byRef: false 124 unpack: false 125 ) 126 2: ArrayItem( 127 key: null 128 value: Expr_Variable( 129 name: b 130 ) 131 byRef: false 132 unpack: false 133 ) 134 ) 135 ) 136 expr: Expr_Variable( 137 name: bar 138 ) 139 ) 140 ) 141 3: Stmt_Expression( 142 expr: Expr_Assign( 143 var: Expr_List( 144 items: array( 145 0: ArrayItem( 146 key: Scalar_String( 147 value: a 148 ) 149 value: Expr_Variable( 150 name: b 151 ) 152 byRef: false 153 unpack: false 154 ) 155 1: ArrayItem( 156 key: Scalar_String( 157 value: b 158 ) 159 value: Expr_Variable( 160 name: a 161 ) 162 byRef: false 163 unpack: false 164 ) 165 ) 166 ) 167 expr: Expr_Variable( 168 name: baz 169 ) 170 ) 171 ) 172) 173