3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* hey, i'm trying to get: Array[1] = Array ( [A1] => 123 [B1] => 1234 [C2] => Array ( [0] => 123 [1] => 456 [2] => 789 ) [R2] => Array ( [0] => 1 [1] => 4 [2] => 4 [3] => 6 ) ) */ $c = array('string'=>array("A1"=>123,"B1"=>1234,"C2"=>array(123,456,789))); $d = array('string'=>array("R2"=>array(1,4,4,6))); echo "<h1>now what</h1>"; $y = array_merge_recursive($d,$c); print_r($y);
Output for git.master, git.master_jit, rfc.property-hooks
<h1>now what</h1>Array ( [string] => Array ( [R2] => Array ( [0] => 1 [1] => 4 [2] => 4 [3] => 6 ) [A1] => 123 [B1] => 1234 [C2] => Array ( [0] => 123 [1] => 456 [2] => 789 ) ) )

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