3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array (0 => 'title=Addition Worksheet', 1 => 'operator=+', 2 => 'numOfQue=6', 3 => 'final_result=positive', 4 => 'marks=3', 5 => 'numOfQueSet=3', 6 => 'orientation=vertical', 7 => 'fnum=1', 8 => 'snum=1' ); $arr2=[]; foreach($arr as $val){ list($key, $value) = explode('=', $val); //echo "\n".$key.' = '.$value; $arr2[trim($key)] = trim($value); } print_r($arr2);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [title] => Addition Worksheet [operator] => + [numOfQue] => 6 [final_result] => positive [marks] => 3 [numOfQueSet] => 3 [orientation] => vertical [fnum] => 1 [snum] => 1 )

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