<?php
$start = new DateTime('first monday this month');
$end = new DateTime('last monday this month');
$dp = new DatePeriod($start, new DateInteval('P7D'), $end);
foreach($dp as $d) {
echo $d->format(DateTime::ISO8601).PHP_EOL;
}
Fatal error: Uncaught Error: Class "DateInteval" not found in /in/fEv0n:5
Stack trace:
#0 {main}
thrown in /in/fEv0n on line 5
Process exited with code 255.
Fatal error: Uncaught Error: Class 'DateInteval' not found in /in/fEv0n:5
Stack trace:
#0 {main}
thrown in /in/fEv0n on line 5
Process exited with code 255.