<?php
$begin = new DateTime('09:00');
$end = new DateTime('21:00');
$intervals = array(
array(new DateTime('10:00'), new DateTime('10:15')),
array(new DateTime('10:15'), new DateTime('11:45')),
array(new DateTime('12:30'), new DateTime('16:00'))
);
$time = 90;
function checkInterval($begin, $end, $time) {
$intervalDiff = $begin->diff($end);
$intervalMinutes = $intervalDiff->h * 60 + $intervalDiff->i;
if ($intervalMinutes >= $time) {
echo $begin->format('H:i'), ' - ', $end->format('H:i'), "\n";
}
}
$intervalStart = $begin;
foreach ($intervals as $interval) {
checkInterval($intervalStart, $interval[0], $time);
$intervalStart = $interval[1];
}
checkInterval($intervalStart, $end, $time);