3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_transpose(array $a) { $r = array(); foreach($a as $keyRow => $subArr) { foreach($subArr as $keyCol => $value) $r[$keyCol][$keyRow] = $value; } return $r; } $arr = [ 'Amministrativo ^25^9,11,2,10,18,4,7,^17,13,^0.75^0^0.25', 'Logico deduttive^7^^21,^0.75^0^-0.25', 'Situazionali^8^^20,^0.75^0^0.375', ]; foreach($arr as $i => $row){ $arr[$i] = explode('^',$row); } $arr = array_transpose($arr); foreach($arr as $i => $row){ $arr[$i] = implode(' ',$row); } var_export($arr);
Output for git.master_jit, git.master, rfc.property-hooks
array ( 0 => 'Amministrativo Logico deduttive Situazionali', 1 => '25 7 8', 2 => '9,11,2,10,18,4,7, ', 3 => '17,13, 21, 20,', 4 => '0.75 0.75 0.75', 5 => '0 0 0', 6 => '0.25 -0.25 0.375', )

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:
80.62 ms | 405 KiB | 5 Q