3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new DatePeriod( new DateTime('2018-12-15'), new DateInterval('P1D'), new DateTime('2018-12-31'), DatePeriod::INCLUDE_END_DATE ); foreach ($period as $date) { $years[$date->format('Y')][$date->format('m')][$date->format('d')] = range(0, 23); } var_export($years);

preferences:
22.77 ms | 405 KiB | 5 Q