3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['parent 1', '10000', '20000'], ['parent 1', '15000', '21000'], ['parent 2', '13000', '22000'], ['parent 2', '11000', '5000'], ]; $output = []; foreach ($array as $key => $value) { $output[$value[0]][] = array($value[1],$value[2]); } print_r($output); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [parent 1] => Array ( [0] => Array ( [0] => 10000 [1] => 20000 ) [1] => Array ( [0] => 15000 [1] => 21000 ) ) [parent 2] => Array ( [0] => Array ( [0] => 13000 [1] => 22000 ) [1] => Array ( [0] => 11000 [1] => 5000 ) ) )

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:
91.82 ms | 407 KiB | 5 Q