3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ "data" => [ ["degree_level" => " Bachelor's"], ["field_of_study" => "Science"], ["grade_point" => 3], ["criteria" => "desired"] ], ]; print_r($arrays); foreach($arrays["data"] as $dataKey => $data) { foreach ($data as $key => $value) { $arrays["data"][$key] = $value; } unset($arrays["data"][$dataKey]); } print_r($arrays);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [data] => Array ( [0] => Array ( [degree_level] => Bachelor's ) [1] => Array ( [field_of_study] => Science ) [2] => Array ( [grade_point] => 3 ) [3] => Array ( [criteria] => desired ) ) ) Array ( [data] => Array ( [degree_level] => Bachelor's [field_of_study] => Science [grade_point] => 3 [criteria] => desired ) )

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:
18.44 ms | 402 KiB | 8 Q