3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 0 => array ( 0 => array ( 'userid' => '1610', ), 1 => array ( 'userid' => '1614', ), 2 => array ( 'userid' => '1616', ), ), 1 => array ( 0 => array ( 'userid' => '1610', ), 1 => array ( 'userid' => '1614', ), 2 => array ( 'userid' => '1616', ), 3 => array ( 'userid' => '1618', ), ), ); foreach($arr as $sub){ $res[][key($sub[0]) . "s"] = array_column($sub, 'userid'); } var_dump($res);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(1) { ["userids"]=> array(3) { [0]=> string(4) "1610" [1]=> string(4) "1614" [2]=> string(4) "1616" } } [1]=> array(1) { ["userids"]=> array(4) { [0]=> string(4) "1610" [1]=> string(4) "1614" [2]=> string(4) "1616" [3]=> string(4) "1618" } } }

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:
129.15 ms | 406 KiB | 5 Q