3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = array ( 14 => array ( 0 => 29, 1 => 129 ), 193 => array ( 0 => 6009231, 1 => 6324415, 2 => 5682922 ), 256 => array ( 0 => 3, 1 => 234 ), 999 => array ( 0 => 111, 1 => 222) ); function list_values($array) { $output = array(); $k1 = array_keys($array)[0]; if (count($array) == 1) { foreach ($array[$k1] as $v1) { $output[] = "$k1:$v1"; } } else { foreach ($array[$k1] as $v1) { foreach (list_values(array_slice($array, 1, null, true)) as $k2 => $v2) { $output[] = "$k1:$v1;$v2"; } } } return $output; } print_r(list_values($myArray));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 14:29;193:6009231;256:3;999:111 [1] => 14:29;193:6009231;256:3;999:222 [2] => 14:29;193:6009231;256:234;999:111 [3] => 14:29;193:6009231;256:234;999:222 [4] => 14:29;193:6324415;256:3;999:111 [5] => 14:29;193:6324415;256:3;999:222 [6] => 14:29;193:6324415;256:234;999:111 [7] => 14:29;193:6324415;256:234;999:222 [8] => 14:29;193:5682922;256:3;999:111 [9] => 14:29;193:5682922;256:3;999:222 [10] => 14:29;193:5682922;256:234;999:111 [11] => 14:29;193:5682922;256:234;999:222 [12] => 14:129;193:6009231;256:3;999:111 [13] => 14:129;193:6009231;256:3;999:222 [14] => 14:129;193:6009231;256:234;999:111 [15] => 14:129;193:6009231;256:234;999:222 [16] => 14:129;193:6324415;256:3;999:111 [17] => 14:129;193:6324415;256:3;999:222 [18] => 14:129;193:6324415;256:234;999:111 [19] => 14:129;193:6324415;256:234;999:222 [20] => 14:129;193:5682922;256:3;999:111 [21] => 14:129;193:5682922;256:3;999:222 [22] => 14:129;193:5682922;256:234;999:111 [23] => 14:129;193:5682922;256:234;999:222 )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
122.52 ms | 409 KiB | 5 Q