I'm fairly new to PHP, so forgive me if this is a stupid question.
I tried to run mktime() on my site and, because I'm still getting familiar with the syntax, ran something like this:
echo date('h:i:s M-d-Y', mktime(12, 00, 00, 12, 08, 2013) );
Which I was surprised to find returned this:
12:00:00 Nov-30-2013
When what I was expecting was this:
12:00:00 Dec-08-2013
I eventually figured out that the "08" was the problem and it should just be "8".
Given that mktime() is capable of making some on-the-fly corrections and assumptions (such as example #2), why didn't it simply correct "08" to "8"? This is especially confusing to me since it handles double 0's just fine. Is this a feature, a bug, or simply an idiosyncrasy of the language?
Also, why did it "correct" to Nov 30 as opposed to some other date? Given the above examples, I would have expected Jan 01.