3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = '10-01-2019'; $end = '21-02-2019'; // This is to progress the range through each day. // 24 days, 60 minutes, 60 seconds $step = 24 * 60 * 60; $days = array_map(function ($day) { return date('d-M-Y', $day); }, range(strtotime($end), strtotime($start), -$step)); array_walk($days, function ($day) { echo $day."\n"; });

preferences:
50.31 ms | 402 KiB | 5 Q