3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json1 = '[{"date":"10"},{"comment":"some comment"},{"user":"john"}]'; $json2 = '[{"date":"11"},{"comment":"another quote"},{"comment":"jim"}]'; $array1 = json_decode($json1,true); $array2 = json_decode($json2,true); $final = array_merge($array1, $array2); echo json_encode($final); print_r($final);
Output for git.master, git.master_jit, rfc.property-hooks
[{"date":"10"},{"comment":"some comment"},{"user":"john"},{"date":"11"},{"comment":"another quote"},{"comment":"jim"}]Array ( [0] => Array ( [date] => 10 ) [1] => Array ( [comment] => some comment ) [2] => Array ( [user] => john ) [3] => Array ( [date] => 11 ) [4] => Array ( [comment] => another quote ) [5] => Array ( [comment] => jim ) )

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