I found something odd about strtotime().
On dates that do not exist it returns the day after.
$d30= strtotime(\"2017-06-30\");
Echo $d30 .\"\\n\";
As day 31
of a month is possible strtotime()
will correct the date for you. If you try it with February (2017-02-31) it will correct to 2017-03-03
. This is what you found.
So, what it essentially does is:
This behaviour is implemented into the strtotime
function itself.
There was a great comment on the documentation page about this, but I am no longer able to find it. This comment provides some extra information (be sure to check the link in the comment).