title: How to check overlapping among multiple date ranges in PHP?
body: <p>There are many posts about checking overlapping between two dates. However I couldn't find any which talks about how to check among multple ranges.</p>
  
  <p>Say I have this array:</p>
  
  <pre><code>$ranges = [
  array('start'=&gt;'2014-01-01' , 'end'=&gt; '2014-01-05'),
  array('start'=&gt;'2014-01-06' &gt; , 'end'=&gt; '2014-01-10'),
  array('start'=&gt;'2014-01-04' &gt; , 'end'=&gt; '2014-01-07')]
  </code></pre>
  
  <p><em>One may simply think that a function which checks overlapping between two ranges can work with a loop among all ranges, but this is wrong, because all ranges can overlap with each others, but not overlap all together.</em> </p>
  
  <p>I hope someone can help me to find a good solution.....</p>