mktime and date questions
<p>I am working on a small project and am playing with date() and mktime() in PHP. Compare the two code blocks and their output, notice the second sample adds one to the month in it's first mktime.</p>

<pre><code>$monthis = 5;
echo date('F', mktime(0,0,0,$monthis,0,0)) . " 1, 2010 is on a " . date("l F", mktime(0, 0, 0, $monthis, 1, 2010));
</code></pre>

<p>puts out</p>

<blockquote>
  <p>April 1, 2010 is on a Saturday May</p>
</blockquote>

<p>but if I change it to</p>

<pre><code>$monthis = 5;
echo date('F', mktime(0,0,0,$monthis + 1,0,0)) . " 1, 2010 is on a " . date("l F", mktime(0, 0, 0, $monthis, 1, 2010));
</code></pre>

<p>puts out</p>

<blockquote>
  <p>May 1, 2010 is on a Saturday May</p>
</blockquote>

<p>Why do I have to add one to the month in the first mktime so that both emit the same month?</p>

<p>Any help or clarity would be appreciated. Thanks :)</p>
