Generate an $difference_map array having differences between two dates from your input $dates array,
$difference_map = array_map(function($v, $k) use ($dates){
if($k == array_keys($dates)[0]) return;
$start = new DateTime($dates[$k-1]);
$end = new DateTime($dates[$k]);
$diff = $start->diff($end);
return $diff->format('%R').$diff->days;
}, $dates, array_keys($dates));
Then count average by,
$average = array_sum($difference_map)/(count($difference_map)-1);
If you take shown array as $dates in this script, $difference_map will look like,
array (size=7)
0 => null
1 => string '+4' (length=2)
2 => string '+0' (length=2)
3 => string '+2' (length=2)
4 => string '+5' (length=2)
5 => string '+2' (length=2)
6 => string '+7' (length=2)
Finally, $average will be,
float 3.3333333333333