3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = new DateTime('2014-05-01'); $endDate = new DateTime('2014-06-02'); // calculate diff $diff = $startDate->diff($endDate); $daysDiff = $diff->days; // clone so the original date will not be changed $currentDate = clone $startDate; for ($i = 0; $i < $daysDiff; $i++) { $currentDate->modify('+'.$i.' days'); echo $currentDate->format('Y-m-d H:i:s')."\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
2014-05-01 00:00:00 2014-05-02 00:00:00 2014-05-04 00:00:00 2014-05-07 00:00:00 2014-05-11 00:00:00 2014-05-16 00:00:00 2014-05-22 00:00:00 2014-05-29 00:00:00 2014-06-06 00:00:00 2014-06-15 00:00:00 2014-06-25 00:00:00 2014-07-06 00:00:00 2014-07-18 00:00:00 2014-07-31 00:00:00 2014-08-14 00:00:00 2014-08-29 00:00:00 2014-09-14 00:00:00 2014-10-01 00:00:00 2014-10-19 00:00:00 2014-11-07 00:00:00 2014-11-27 00:00:00 2014-12-18 00:00:00 2015-01-09 00:00:00 2015-02-01 00:00:00 2015-02-25 00:00:00 2015-03-22 00:00:00 2015-04-17 00:00:00 2015-05-14 00:00:00 2015-06-11 00:00:00 2015-07-10 00:00:00 2015-08-09 00:00:00 2015-09-09 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:
32.12 ms | 403 KiB | 8 Q