3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = array( "2018-08-30" => 8, "2018-08-31" => 2, "2018-09-04" => 4, "2018-09-20" => 1, "2018-09-24" => 1, "2018-09-27" => 2, ); $dateRanges = array( "2018-08-28" => 0, "2018-08-29" => 1, "2018-08-30" => 2, "2018-08-31" => 3, "2018-09-01" => 4, "2018-09-02" => 5, "2018-09-03" => 6, "2018-09-04" => 7, "2018-09-05" => 8, "2018-09-06" => 9, "2018-09-07" => 10, "2018-09-08" => 11, "2018-09-09" => 12, "2018-09-10" => 13, "2018-09-11" => 14, "2018-09-12" => 15, "2018-09-13" => 16, "2018-09-14" => 17, "2018-09-15" => 18, "2018-09-16" => 19, "2018-09-17" => 20, "2018-09-18" => 21, "2018-09-19" => 22, "2018-09-20" => 23, "2018-09-21" => 24, "2018-09-22" => 25, "2018-09-23" => 26, "2018-09-24" => 27, "2018-09-25" => 28, "2018-09-26" => 29, "2018-09-27" => 30 ); $newArr = array_merge(array_map(function($v){return 0;}, $dateRanges), $result); print_r($newArr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [2018-08-28] => 0 [2018-08-29] => 0 [2018-08-30] => 8 [2018-08-31] => 2 [2018-09-01] => 0 [2018-09-02] => 0 [2018-09-03] => 0 [2018-09-04] => 4 [2018-09-05] => 0 [2018-09-06] => 0 [2018-09-07] => 0 [2018-09-08] => 0 [2018-09-09] => 0 [2018-09-10] => 0 [2018-09-11] => 0 [2018-09-12] => 0 [2018-09-13] => 0 [2018-09-14] => 0 [2018-09-15] => 0 [2018-09-16] => 0 [2018-09-17] => 0 [2018-09-18] => 0 [2018-09-19] => 0 [2018-09-20] => 1 [2018-09-21] => 0 [2018-09-22] => 0 [2018-09-23] => 0 [2018-09-24] => 1 [2018-09-25] => 0 [2018-09-26] => 0 [2018-09-27] => 2 )

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