3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => '"["Option 1", "Option 2", "Option 3"]"', 1 => '"["Option 1.1", "Option 1.2"]"' ]; foreach($arr as &$a) $a = json_decode(trim($a, '"'), true); var_dump($arr); var_dump([0=>array_merge(... $arr)]);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(3) { [0]=> string(8) "Option 1" [1]=> string(8) "Option 2" [2]=> string(8) "Option 3" } [1]=> &array(2) { [0]=> string(10) "Option 1.1" [1]=> string(10) "Option 1.2" } } array(1) { [0]=> array(5) { [0]=> string(8) "Option 1" [1]=> string(8) "Option 2" [2]=> string(8) "Option 3" [3]=> string(10) "Option 1.1" [4]=> string(10) "Option 1.2" } }

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