- var_dump: documentation ( source)
<?php
$firstAvailableCount = 100;
$slice = 'weekly';
$countData = array();
$startDateTime = new DateTime("2015-06-03");
$endDateTime = new DateTime("2016-01-05");
fillCountMapPeriod($startDateTime,$endDateTime,$countData,$firstAvailableCount,$slice);
function fillCountMapPeriod( DateTime $startDateTime, DateTime $endDateTime, array $countData, $firstAvailableCount, $slice) {
$monthlyInterval = new DateInterval('P1M');
while($startDateTime->add($monthlyInterval) < $endDateTime){
var_dump($startDateTime);
}
}