- var_export: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
- range: documentation ( source)
<?php
// from 2015 through all of 2018, expect 35,064 elements in the deepest level.
$start = 2018;
$end = 2018;
$years = [];
foreach (range($start, $end) as $y) {
$months = [];
for ($m = 1; $m <= 12; ++$m) {
$lastDayOfMonth = date('t', strtotime("$y-$m-01"));
$days = [];
for ($d = 1; $d <= $lastDayOfMonth; ++$d) {
$days[] = range(0, 23);
}
$months[] = $days;
}
$years[] = $months;
}
var_export($years);
This script was stopped while abusing our resources