For a reason that I have no idea, my developer machine is treating strtotime() differently than my server. This has not been the case in the past and I just now, this very day, realized this. I don't know whether this has to do with the PHP version running or not, but I need help to figure this out.
Again, I have seen the same output on the developer machine as I have on the server for years, and not until now did I notice a difference.
To print out the last day of the month, I have used the following code:
date('Y-m-d', strtotime('last day'));
OUTPUTS:
Server: 2013-05-31
Dev. Machine: 2013-05-06
PHP VERSIONS:
Server: 5.3.2
Dev. Machine: 5.3.10
Both machines run Ubuntu Linux (10.04 and 12.04 respectivly)
Does this have to do with the differences in PHP or something else? I'm now scared to death to upgrade the server as plenty of my applications and scripts rely on this function in order to process dates and time correctly. I can see how the string 'last day' can be interpreted in both ways, but I just chose this as an example. I have plenty of other strings passed to this function that is no longer interpreted "correctly", much less confusing as the string 'last day'.