<?php
$start = new DateTimeImmutable('2012-07-01');
$interval = new DateInterval('P7D');
$periodWithRecurrences = new DatePeriod($start, $interval, 0);
Fatal error: Uncaught DateMalformedPeriodStringException: DatePeriod::__construct(): Recurrence count must be greater or equal to 1 and lower than 2147483640 in /in/vjVTF:6
Stack trace:
#0 /in/vjVTF(6): DatePeriod->__construct(Object(DateTimeImmutable), Object(DateInterval), 0)
#1 {main}
thrown in /in/vjVTF on line 6
Process exited with code 255.
Output for 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
Fatal error: Uncaught DateMalformedPeriodStringException: DatePeriod::__construct(): Recurrence count must be greater than 0 in /in/vjVTF:6
Stack trace:
#0 /in/vjVTF(6): DatePeriod->__construct(Object(DateTimeImmutable), Object(DateInterval), 0)
#1 {main}
thrown in /in/vjVTF on line 6
Process exited with code 255.
Fatal error: Uncaught Exception: DatePeriod::__construct(): Recurrence count must be greater than 0 in /in/vjVTF:6
Stack trace:
#0 /in/vjVTF(6): DatePeriod->__construct(Object(DateTimeImmutable), Object(DateInterval), 0)
#1 {main}
thrown in /in/vjVTF on line 6
Process exited with code 255.
Fatal error: Uncaught Exception: DatePeriod::__construct(): The recurrence count '0' is invalid. Needs to be > 0 in /in/vjVTF:6
Stack trace:
#0 /in/vjVTF(6): DatePeriod->__construct(Object(DateTimeImmutable), Object(DateInterval), 0)
#1 {main}
thrown in /in/vjVTF on line 6
Process exited with code 255.