3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr1 = array ( 0 => array ( "id" => "123-456-000-000", "name" => "john" ), 1 => array ( "id" => "123-456-789-014", "name" => "james" ) ); $arr2 = array ( 0 => array ( "tin" => "123-456-000-000", "address" => "Japan" ), 1 => array ( "tin" => "123-456-789-014", "address" => "Spain" ) ); foreach ($arr2 as $key => $inner) { $arr1[$key]["address"] = $inner["address"]; } print_r($arr1);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [id] => 123-456-000-000 [name] => john [address] => Japan ) [1] => Array ( [id] => 123-456-789-014 [name] => james [address] => Spain ) )

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:
26.28 ms | 1549 KiB | 4 Q