title: php date difference calculation adding additional days
body: <p>Trying to display difference between two dates in PHP.</p>
  <pre><code>&lt;?php
      $date1 = new DateTime(&quot;2022-03-01&quot;);
      $date2 = new DateTime(&quot;2022-04-01&quot;);
      $interval = $date1-&gt;diff($date2);
      echo $interval-&gt;days;
      echo &quot;difference &quot; . $interval-&gt;y . &quot; years, &quot; . $interval-&gt;m.&quot; months, &quot;.$interval-&gt;d.&quot; days &quot;; 
  ?&gt;
  </code></pre>
  <p>I am getting result as:-</p>
  <blockquote>
  <p>31difference 0 years, 1 months, 3 days</p>
  </blockquote>
  <p><code>$interval-&gt;days</code> result is correct, but why having <code>$interval-&gt;d</code> as 3 when its just a month difference?</p>