3v4l.org

run code in 300+ PHP versions simultaneously
<?php $select['clientChoice'] = '{"23" : {"13x18":"5","20X30":"5","30x45":"4","digital":"4"}}'; $clientChoice = array(42 => array("13x18" => 2, "20X30" => 1, "30x45" =>3 , "digital" => 1)); $tabs = json_decode($select['clientChoice'], true); print_r($tabs); $new = array_merge($tabs, $clientChoice); print_r($new); $new = $tabs + $clientChoice; print_r($new); $chosen = json_encode($new);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [23] => Array ( [13x18] => 5 [20X30] => 5 [30x45] => 4 [digital] => 4 ) ) Array ( [0] => Array ( [13x18] => 5 [20X30] => 5 [30x45] => 4 [digital] => 4 ) [1] => Array ( [13x18] => 2 [20X30] => 1 [30x45] => 3 [digital] => 1 ) ) Array ( [23] => Array ( [13x18] => 5 [20X30] => 5 [30x45] => 4 [digital] => 4 ) [42] => Array ( [13x18] => 2 [20X30] => 1 [30x45] => 3 [digital] => 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:
122.48 ms | 407 KiB | 5 Q