3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON {"g_aaa77": {"'title'":"title2", "'r_a6cff'": {"name":"name2","price":"2"}, "'r_7fc7b'": {"name":"name22","price":"22"} }, "g_a36b5": {"title":"title1", "r_4e122": {"name":"name1","price":"1"}, "r_155fa": {"name":"name11","price":"11"} } } JSON; $array = json_decode($json, true); print_r($array); $array = array_values($array); print_r($array); echo $array[1]['title'];
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [g_aaa77] => Array ( ['title'] => title2 ['r_a6cff'] => Array ( [name] => name2 [price] => 2 ) ['r_7fc7b'] => Array ( [name] => name22 [price] => 22 ) ) [g_a36b5] => Array ( [title] => title1 [r_4e122] => Array ( [name] => name1 [price] => 1 ) [r_155fa] => Array ( [name] => name11 [price] => 11 ) ) ) Array ( [0] => Array ( ['title'] => title2 ['r_a6cff'] => Array ( [name] => name2 [price] => 2 ) ['r_7fc7b'] => Array ( [name] => name22 [price] => 22 ) ) [1] => Array ( [title] => title1 [r_4e122] => Array ( [name] => name1 [price] => 1 ) [r_155fa] => Array ( [name] => name11 [price] => 11 ) ) ) title1

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:
25.27 ms | 409 KiB | 5 Q