This isn't an issue with mktime
, but with how PHP interprets literal numbers.
In PHP, when a literal number is prefixed with a zero, e.g. 01
or 08
it is interpreted as octal, see http://www.php.net/manual/en/language.types.integer.php similar to how the 0x
prefix denotes hexadecimal literal numbers.
Note that 08
is actually invalid, as octal numbers have the digits 0-7, PHP's documentation states that "If an invalid digit is given in an octal integer (i.e. 8 or 9), the rest of the number is ignored.", so 08
becomes 0
, hence why it snaps to 30th November.