title: Are PHP DateInterval comparable like DateTime?
body: <p>I discovered that a DateTime object in PHP can be compared to another as the ">" and "&lt;" operators are overloaded.</p>
  
  <p>Is it the same with DateInterval?</p>
  
  <p>As I was trying to answer this question, I found something strange:</p>
  
  <pre><code>&lt;?php 
  
  $today = new DateTime();
  $release  = new DateTime('14-02-2012');
  $building_time = new DateInterval('P15D');
  var_dump($today-&gt;diff($release));
  var_dump($building_time);
  var_dump($today-&gt;diff($release)&gt;$building_time);
  var_dump($today-&gt;diff($release)&lt;$building_time);
  if($today-&gt;diff($release) &lt; $building_time){
      echo 'oK';
  }else{
      echo 'Just a test';
  }
  </code></pre>
  
  <p>It always echoes "Just a test". The var_dump outputs are:</p>
  
  <pre><code>object(DateInterval)#4 (8) {
    ["y"]=&gt;
    int(0)
    ["m"]=&gt;
    int(0)
    ["d"]=&gt;
    int(18)
    ["h"]=&gt;
    int(16)
    ["i"]=&gt;
    int(49)
    ["s"]=&gt;
    int(19)
    ["invert"]=&gt;
    int(1)
    ["days"]=&gt;
    int(18)
  }
  object(DateInterval)#3 (8) {
    ["y"]=&gt;
    int(0)
    ["m"]=&gt;
    int(0)
    ["d"]=&gt;
    int(15)
    ["h"]=&gt;
    int(0)
    ["i"]=&gt;
    int(0)
    ["s"]=&gt;
    int(0)
    ["invert"]=&gt;
    int(0)
    ["days"]=&gt;
    bool(false)
  }
  bool(false)
  bool(true)
  </code></pre>
  
  <p>When I try with a DateTime as "01-03-2012" everything works.</p>