3v4l.org

run code in 300+ PHP versions simultaneously
<?php parse_str("ref_1=000CBA0000&name_1=Produto%20A&quantity_1=1&ref_2=000CBA0000&name_2=Produto%20A&quantity_2=1&ref_3=000CBA0000&name_3=Produto%20A&quantity_3=1", $arr); foreach($arr as $key => $val){ $temp = explode("_", $key); $new[$temp[1]][$temp[0]] = $val; } var_dump($new);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [1]=> array(3) { ["ref"]=> string(10) "000CBA0000" ["name"]=> string(9) "Produto A" ["quantity"]=> string(1) "1" } [2]=> array(3) { ["ref"]=> string(10) "000CBA0000" ["name"]=> string(9) "Produto A" ["quantity"]=> string(1) "1" } [3]=> array(3) { ["ref"]=> string(10) "000CBA0000" ["name"]=> string(9) "Produto A" ["quantity"]=> string(1) "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:
194.44 ms | 406 KiB | 5 Q