I have 2 range of numbers:
$startTime
to $endTime
$offerStartTime
to $offerEndTime
Hope this will help you out, I have tried this with all your inputs and it is working fine..
0);
{
if(count($set)>1)
{
echo "Matched";
}
//added this to prevent this case offerStartTime: 1, offerEndTime: 10,
//ranges intersection is the endTime
elseif(count($set)==1)
{
if($set[0]!=$startTime)
{
echo "Matched";
}
}
}