3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php list(list($a, $b), list($c, $d)) = $x; // PHP5: $a = $x[0][0]; $b = $x[0][1]; $c = $x[1][0]; $d = $x[1][1]; // PHP7 (assuming nothing is a string): $_tmp1 = $x[0]; $a = $_tmp1[0]; $b = $_tmp1[1]; $_tmp2 = $x[1]; $c = $_tmp2[0]; $d = $_tmp2[1];
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: x in /in/8JgBJ on line 3 Notice: Undefined variable: x in /in/8JgBJ on line 3 Notice: Undefined variable: x in /in/8JgBJ on line 6 Notice: Undefined variable: x in /in/8JgBJ on line 7 Notice: Undefined variable: x in /in/8JgBJ on line 8 Notice: Undefined variable: x in /in/8JgBJ on line 9 Notice: Undefined variable: x in /in/8JgBJ on line 12 Notice: Undefined variable: x in /in/8JgBJ on line 15
Output for 5.3.19 - 5.6.28
Notice: Undefined variable: x in /in/8JgBJ on line 3 Notice: Undefined variable: x in /in/8JgBJ on line 3 Notice: Undefined variable: x in /in/8JgBJ on line 3 Notice: Undefined variable: x in /in/8JgBJ on line 3 Notice: Undefined variable: x in /in/8JgBJ on line 6 Notice: Undefined variable: x in /in/8JgBJ on line 7 Notice: Undefined variable: x in /in/8JgBJ on line 8 Notice: Undefined variable: x in /in/8JgBJ on line 9 Notice: Undefined variable: x in /in/8JgBJ on line 12 Notice: Undefined variable: x in /in/8JgBJ on line 15