3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [0 => 11, 1 => 2.5]; $arr2 = [ 0 => (object)[ "type" => 1, "creator_id" => 3, "creator_name" => "E1", "per_tar" => 300, "pro_tar" => 200, "ac" => 300, "PA" => 17, "Q1" => 800 ], 1 => (object)[ "type" => 1, "creator_id" => 3, "creator_name" => "E2", "per_tar" => 100, "pro_tar" => 170, "ac" => 0, "PA" => 7, "Q1" => 270 ] ]; foreach ($arr1 as $key=>$value){ $arr2[$key]->new = $value; } print_r($arr2); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => stdClass Object ( [type] => 1 [creator_id] => 3 [creator_name] => E1 [per_tar] => 300 [pro_tar] => 200 [ac] => 300 [PA] => 17 [Q1] => 800 [new] => 11 ) [1] => stdClass Object ( [type] => 1 [creator_id] => 3 [creator_name] => E2 [per_tar] => 100 [pro_tar] => 170 [ac] => 0 [PA] => 7 [Q1] => 270 [new] => 2.5 ) )

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:
29.82 ms | 407 KiB | 5 Q