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; for ($i = 0; $i < $daysDiff; $i++) { // clone so the original date will not be changed $currentDate = clone $startDate; $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-03 00:00:00 2014-05-04 00:00:00 2014-05-05 00:00:00 2014-05-06 00:00:00 2014-05-07 00:00:00 2014-05-08 00:00:00 2014-05-09 00:00:00 2014-05-10 00:00:00 2014-05-11 00:00:00 2014-05-12 00:00:00 2014-05-13 00:00:00 2014-05-14 00:00:00 2014-05-15 00:00:00 2014-05-16 00:00:00 2014-05-17 00:00:00 2014-05-18 00:00:00 2014-05-19 00:00:00 2014-05-20 00:00:00 2014-05-21 00:00:00 2014-05-22 00:00:00 2014-05-23 00:00:00 2014-05-24 00:00:00 2014-05-25 00:00:00 2014-05-26 00:00:00 2014-05-27 00:00:00 2014-05-28 00:00:00 2014-05-29 00:00:00 2014-05-30 00:00:00 2014-05-31 00:00:00 2014-06-01 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:
34.02 ms | 402 KiB | 8 Q