3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = '29/08/2013'; $date2 = '03/09/2013'; function returnDates($fromdate, $todate) { $fromdate = DateTime::createFromFormat('d/m/Y', $fromdate); $todate = DateTime::createFromFormat('d/m/Y', $todate); return new DatePeriod( $fromdate, new DateInterval('P1D'), $todate->modify('+1 day') ); } $datePeriod = returnDates($date1, $date2); foreach($datePeriod as $date) { echo $date->format('d/m/Y'), PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
29/08/2013 30/08/2013 31/08/2013 01/09/2013 02/09/2013 03/09/2013

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:
31.4 ms | 401 KiB | 8 Q