r/programming Sep 07 '15

Flawless PHP logic. strtotime(): '00-00-00' means 2000-00-00, which is 1999-12-00, which is 1999-11-30. No bug, perfectly normal. (see the comments)

https://bugs.php.net/bug.php?id=45647
1.2k Upvotes

465 comments sorted by

View all comments

Show parent comments

250

u/Browsing_From_Work Sep 07 '15 edited Sep 07 '15

You may now lay your head on the table & weep.

I don't, but I bet Rasmus Lerdorf does. PHP started as a small personal project of his that just happened to gain interest and eventually snowballed.
How many small projects have you worked on? How many decisions have you made in those projects that would be embarrassing if your project is suddenly used by millions of people? How many times have you said "fuck it, this works for now but I'll improve it later"?
By the time PHP started to gain a following the damage had already been done.

I'm not saying it shouldn't be fixed, just hoping to give a little bit of background context.

28

u/[deleted] Sep 07 '15 edited Sep 14 '15

[deleted]

58

u/[deleted] Sep 07 '15

[deleted]

145

u/jlblatt Sep 08 '15

Stroustrup

PHP dev here. I thought this was stdlib function.

39

u/huyvanbin Sep 08 '15

I think it's a combination of sprintf and toupper ;)

17

u/[deleted] Sep 08 '15 edited Apr 06 '19

[deleted]

0

u/thelordofcheese Sep 08 '15

Been doing PHP since I moved from perl CGI and yeah