From https://bugs.php.net/bug.php?id=55327:
Numbers with leading 0's are octal. 08 is an invalid value. See http://php.net/integer
If you prefix a number with a leading 0
, it marks the number as Octal. The octal numeral system uses the digits 0 to 7. So, 08
and 09
doesn't exist and are invalid.
The second statement is correct, and that's the correct method:
echo date("Y-m-d", mktime(0, 0, 0, 9, 23, 2013));