3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=[[1,2,3],[4,5,6],[7,8,9],[0,9],[7],[0,1,2]]; foreach($array as $v) { list($a, $b, $c) = $v + [,,]; print $a.'-'.$b.'-'.$c; print_r($v); }
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Fatal error: Cannot use empty array elements in arrays in /in/9AN2f on line 4
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33
Parse error: syntax error, unexpected ',', expecting ']' in /in/9AN2f on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/9AN2f on line 2
Process exited with code 255.

preferences:
276.47 ms | 1395 KiB | 274 Q