3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=['cses_id'=>'54','ccc_id'=>'1157','csh_id'=>'206','css_id'=>'441,442','sai_id'=>'12213']; $count=0; $multi=array_map(function($v)use(&$count){$count=max($count,substr_count($v,',')); return explode(',',$v);},$array); ++$count; for($col=0; $col<$count; ++$col){ $temp=[]; foreach($multi as $key=>&$val){ $temp[$key]=(sizeof($val)>1?array_shift($val):current($val)); } $result[]=$temp; } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'cses_id' => '54', 'ccc_id' => '1157', 'csh_id' => '206', 'css_id' => '441', 'sai_id' => '12213', ), 1 => array ( 'cses_id' => '54', 'ccc_id' => '1157', 'csh_id' => '206', 'css_id' => '442', 'sai_id' => '12213', ), )

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