When executing the following code, PHP only shows month 10 and 12, ignoring month 11 at all.
$sollStart = '2019-10-31 00:00:01';
$sollEnde = '2019-12-31 23:59:59';
$start = new DateTime($sollStart);
$end = new DateTime($sollEnde);
$periodInterval = new \DateInterval('P1M');
$periodIterator = new \DatePeriod($start, $periodInterval, $end);
foreach ($periodIterator as $monat) {
echo $monat->format('m');
}
If I change the start date to 2019-10-30 it is working like expected.
I've no idea what to change to make it work.