3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $st_date = '2020-10-01'; $ed_date = '2020-10-31'; $min = strtotime($st_date); $copy_min = $min; $start = new DateTime($st_date, new DateTimeZone('Europe/Rome')); $interval = new DateInterval('P1D'); $recurrence = 30; $period = new DatePeriod($start, $interval, $recurrence); foreach ($period as $date) { $test[] = $date->format('U'); } $i = 0; while($i < 31) { $array[$i] = $min; $min = strtotime('+1 day', $min); $i++; } $min = $copy_min; $range = array_map("toDate", $array); print_r($range); $range_period = array_map("toDate", $test); print_r($range_period); function toDate($x){return date('Y-m-d H:i:s', $x);}
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 2020-10-01 00:00:00 [1] => 2020-10-02 00:00:00 [2] => 2020-10-03 00:00:00 [3] => 2020-10-04 00:00:00 [4] => 2020-10-05 00:00:00 [5] => 2020-10-06 00:00:00 [6] => 2020-10-07 00:00:00 [7] => 2020-10-08 00:00:00 [8] => 2020-10-09 00:00:00 [9] => 2020-10-10 00:00:00 [10] => 2020-10-11 00:00:00 [11] => 2020-10-12 00:00:00 [12] => 2020-10-13 00:00:00 [13] => 2020-10-14 00:00:00 [14] => 2020-10-15 00:00:00 [15] => 2020-10-16 00:00:00 [16] => 2020-10-17 00:00:00 [17] => 2020-10-18 00:00:00 [18] => 2020-10-19 00:00:00 [19] => 2020-10-20 00:00:00 [20] => 2020-10-21 00:00:00 [21] => 2020-10-22 00:00:00 [22] => 2020-10-23 00:00:00 [23] => 2020-10-24 00:00:00 [24] => 2020-10-25 00:00:00 [25] => 2020-10-26 00:00:00 [26] => 2020-10-27 00:00:00 [27] => 2020-10-28 00:00:00 [28] => 2020-10-29 00:00:00 [29] => 2020-10-30 00:00:00 [30] => 2020-10-31 00:00:00 ) Array ( [0] => 2020-10-01 00:00:00 [1] => 2020-10-02 00:00:00 [2] => 2020-10-03 00:00:00 [3] => 2020-10-04 00:00:00 [4] => 2020-10-05 00:00:00 [5] => 2020-10-06 00:00:00 [6] => 2020-10-07 00:00:00 [7] => 2020-10-08 00:00:00 [8] => 2020-10-09 00:00:00 [9] => 2020-10-10 00:00:00 [10] => 2020-10-11 00:00:00 [11] => 2020-10-12 00:00:00 [12] => 2020-10-13 00:00:00 [13] => 2020-10-14 00:00:00 [14] => 2020-10-15 00:00:00 [15] => 2020-10-16 00:00:00 [16] => 2020-10-17 00:00:00 [17] => 2020-10-18 00:00:00 [18] => 2020-10-19 00:00:00 [19] => 2020-10-20 00:00:00 [20] => 2020-10-21 00:00:00 [21] => 2020-10-22 00:00:00 [22] => 2020-10-23 00:00:00 [23] => 2020-10-24 00:00:00 [24] => 2020-10-25 00:00:00 [25] => 2020-10-26 00:00:00 [26] => 2020-10-27 00:00:00 [27] => 2020-10-28 00:00:00 [28] => 2020-10-29 00:00:00 [29] => 2020-10-30 00:00:00 [30] => 2020-10-31 00:00:00 )

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:
136.86 ms | 411 KiB | 5 Q