3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date=strtotime('2018-03-21'); $date2=strtotime('2018-05-14' . '23:59'); While($date <= $date2){ $new[date("W", $date)]['start'] = date("Y-m-d", $date); $new[date("W", $date)]['end'] = date("Y-m-d", $date + (6-date("N", $date))*86400); $date = $date + (8-date("N", $date))*86400; } $w =array_keys($new); $new[end($w)]["end"] = date("Y-m-d", $date2); Var_dump($new);
Output for git.master, git.master_jit, rfc.property-hooks
array(9) { [12]=> array(2) { ["start"]=> string(10) "2018-03-21" ["end"]=> string(10) "2018-03-24" } [13]=> array(2) { ["start"]=> string(10) "2018-03-26" ["end"]=> string(10) "2018-03-31" } [14]=> array(2) { ["start"]=> string(10) "2018-04-02" ["end"]=> string(10) "2018-04-07" } [15]=> array(2) { ["start"]=> string(10) "2018-04-09" ["end"]=> string(10) "2018-04-14" } [16]=> array(2) { ["start"]=> string(10) "2018-04-16" ["end"]=> string(10) "2018-04-21" } [17]=> array(2) { ["start"]=> string(10) "2018-04-23" ["end"]=> string(10) "2018-04-28" } [18]=> array(2) { ["start"]=> string(10) "2018-04-30" ["end"]=> string(10) "2018-05-05" } [19]=> array(2) { ["start"]=> string(10) "2018-05-07" ["end"]=> string(10) "2018-05-12" } [20]=> array(2) { ["start"]=> string(10) "2018-05-14" ["end"]=> string(10) "2018-05-14" } }

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:
79.35 ms | 403 KiB | 8 Q