3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_from1 = new DateTime('1-9-2016'); $date_from=$date_from1->format('Y-m-d'); $date_to1 = new DateTime('30-9-2016'); $date_to=$date_to1->format('Y-m-d'); $diff1=$date_from1->diff($date_to1); $diff2= $diff1->format('%R %a days'); $interval = new DateInterval('P1D'); preg_match_all('!\d+!', $diff2, $matches); //use that to get only number from diff2 for($i=0; $i <= $matches[0][0]; $i++) //$matches return diff2 only number of days { $this_date= $i? $date_from1->add($interval): $date_from1; echo $this_date->format('Y-m-d') . "\r\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
2016-09-01 2016-09-02 2016-09-03 2016-09-04 2016-09-05 2016-09-06 2016-09-07 2016-09-08 2016-09-09 2016-09-10 2016-09-11 2016-09-12 2016-09-13 2016-09-14 2016-09-15 2016-09-16 2016-09-17 2016-09-18 2016-09-19 2016-09-20 2016-09-21 2016-09-22 2016-09-23 2016-09-24 2016-09-25 2016-09-26 2016-09-27 2016-09-28 2016-09-29 2016-09-30

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:
116.96 ms | 406 KiB | 5 Q