3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newResponse = [ [ "courseId" => 18, "courseDisplayName" => "qqq" ], [ "courseId" => 1, "courseDisplayName" => "ips", ], [ "courseId" => 18, "courseDisplayName" => "qqq", ], [ "courseId" => 1, "courseDisplayName" => "ips", ] ]; $key = [ [ "totalPoints" => 2, "percent" => 1.0, "id" => 2 ], [ "totalPoints" => 10, "percent" => 2, "id" => 3 ], [ "totalPoints" => 4, "percent" => 0.0, "id" => 6 ], [ "totalPoints" => 4, "percent" => 0.0, "id" => 5 ] ]; var_export(array_map('array_merge', $newResponse, $key));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'courseId' => 18, 'courseDisplayName' => 'qqq', 'totalPoints' => 2, 'percent' => 1.0, 'id' => 2, ), 1 => array ( 'courseId' => 1, 'courseDisplayName' => 'ips', 'totalPoints' => 10, 'percent' => 2, 'id' => 3, ), 2 => array ( 'courseId' => 18, 'courseDisplayName' => 'qqq', 'totalPoints' => 4, 'percent' => 0.0, 'id' => 6, ), 3 => array ( 'courseId' => 1, 'courseDisplayName' => 'ips', 'totalPoints' => 4, 'percent' => 0.0, 'id' => 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:
28.43 ms | 407 KiB | 5 Q