3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $startDate = new DateTime('2018-10-11'); $endDate = new DateTime('2018-10-12'); $dateRangeRedux = new DatePeriod($startDate, new DateInterval('P1D'), $endDate); foreach($dateRangeRedux as $day) { echo 'day!'.PHP_EOL; }
based on GR7lA
Output for 5.6.38 - 7.3.0rc3
day!