- print_r: documentation ( source)
<?php
$start = new DateTimeImmutable('2012-07-01');
$end = new DateTimeImmutable('2012-07-31');
$interval = new DateInterval('P7D');
$recurrences = 4;
$periodWithRecurrences = new DatePeriod($start, $interval, $recurrences);
$rc = new ReflectionObject($periodWithRecurrences);
print_r($rc->getProperties());
$periodWithoutRecurrences = new DatePeriod($start, $interval, $end);
$rc = new ReflectionObject($periodWithoutRecurrences);
print_r($rc->getProperties());