3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = [1,2,3,4,5,6,7,8,9,10,11,12]; $ct = 0; $out = array_map(function($v, $y) use (&$ct){ return [$v[$ct++], $y[$ct++]]; }, $x, $x); print_r($out);
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
Array ( [0] => Array ( [0] => [1] => ) [1] => Array ( [0] => [1] => ) [2] => Array ( [0] => [1] => ) [3] => Array ( [0] => [1] => ) [4] => Array ( [0] => [1] => ) [5] => Array ( [0] => [1] => ) [6] => Array ( [0] => [1] => ) [7] => Array ( [0] => [1] => ) [8] => Array ( [0] => [1] => ) [9] => Array ( [0] => [1] => ) [10] => Array ( [0] => [1] => ) [11] => Array ( [0] => [1] => ) )