3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = Array ( "category_id" => Array ( 0 => 1, 1 => 4, ), "pay_type_id" => Array ( 0 => 2, 1 => 5, ), "frequency_id" => Array ( 0 => 3, 1 => 6, ), ); $i=0; foreach($arr as $key => $value) { foreach ($value as $k => $v) { $postData[$k][$key] = $v; } } print_r($postData);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [category_id] => 1 [pay_type_id] => 2 [frequency_id] => 3 ) [1] => Array ( [category_id] => 4 [pay_type_id] => 5 [frequency_id] => 6 ) )

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