title: Adding time durations together with PHP
body: <p>I have a form that allows people to enter different lengths of time, for example:</p>
  
  <pre><code>input.time1 = "19:00"
  input.time2 = "2:30"
  input.time3 = "0:30"
  </code></pre>
  
  <p>I need to add those 3 times together and then subtract it from a base value I have (21:00). </p>
  
  <pre><code>$base = "21:00"
  </code></pre>
  
  <p>Then I need something like this:</p>
  
  <pre><code>$total = $time1 + $time2 + $time3; //equals 22:00
  $base  = "21:00"; // set value
  $diff  = $base - $total; // 21:00 - 22:00 = -1:00(mm:ss)
  </code></pre>
  
  <p>Hope this all makes sense, please let me know if I need to explain anything in better detail. Thank you!</p>