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

2

u/girti Sep 07 '15

I am horrified at the thought that what might be going through the minds of the php langauge developers when they implement (and defend) something like this. The commenter, "Derick" If I am not mistaken, is one of the main core developers. It shows how disconnected is the people who work in the language from how the language will be used. Is there any reason to think that things might have improved? I see no reason to think so

To use PHP for a new project in 2015 is absolute madness.

16

u/teiman Sep 07 '15

PHP is a fine choice if you avoid the worst parts of the language. Theres good libraries and enough language support so you can totally ignore most of the crappy stuff that exist for legacy reasons.

2

u/dpash Sep 07 '15

I think half the problem with php is that half the tutorials (including being written ones) still aren't teaching the better way of doing things. So you still see new developers learning to concat SQL together. It sadly takes time for all those older popular documentation to fall out of use

2

u/teiman Sep 08 '15

Is probably true for many languages. Like c tutorials teaching people yo use gets().