Live data from Hacker News

PHP: md5('240610708') == md5('QNKCDZO')

3v4l.org

181–185 of 185 posts

Re: PHP: md5('240610708') == md5('QNKCDZO')

#181

Earlier quoted context omitted.

Yeah, documentation is for pussies.

Here is one PHP core developer claiming that PHP documentation is wrong, even on fundamental things... http://www.reddit.com/r/lolphp/comments/2md8c0/new_safe_cast... Just saying....

PHP doesn't even pass its own test suite.

That's right... they consider certain tests failing OK, a certain number of failures OK, tests failing nondeterministically OK.

Just saying... Who gives a shit about programmer headaches? ;)

Re: PHP: md5('240610708') == md5('QNKCDZO')

#182

Earlier quoted context omitted.

Once I wrote a little PHP application to manage a clan in a browser game. I used an MD5 hash as session id that I checked with if(session_id) When users started reporting that their logins would sometimes not work at the first time, I found out that strings that start with zero are coerced to 0 and then interpreted as false. Never used PHP for anything important since.

> I used an MD5 hash as session id > Never used PHP for anything important since. The problem here isn't PHP, the problem here is you.

If you don't like "keep it simple stupid" and determinism in your language of choice (much less immutability)... you're basically everything wrong with programming in the year 2015

Re: PHP: md5('240610708') == md5('QNKCDZO')

#183
post #23
post #22

Earlier quoted context omitted.

That - and the error is going to be a lot more subtle and harder to find. In all fairness though, it's a balancing act - There are benefits to dynamic typing, but PHP clearly overdid it. (See also the disaster that was/is magic quotes)

I believe you are confusing dynamic with weak typing. Other languages got dynamic typing quite right.

Right - that should have read weak typing.

Re: PHP: md5('240610708') == md5('QNKCDZO')

#184

Earlier quoted context omitted.

Once I wrote a little PHP application to manage a clan in a browser game. I used an MD5 hash as session id that I checked with if(session_id) When users started reporting that their logins would sometimes not work at the first time, I found out that strings that start with zero are coerced to 0 and then interpreted as false. Never used PHP for anything important since.

> I used an MD5 hash as session id > Never used PHP for anything important since. The problem here isn't PHP, the problem here is you.

Please, read "The Design of Everyday Things": http://www.amazon.com/Design-Everyday-Things-Donald-Norman/d...

Re: PHP: md5('240610708') == md5('QNKCDZO')

#185

Earlier quoted context omitted.

> I used an MD5 hash as session id > Never used PHP for anything important since. The problem here isn't PHP, the problem here is you.

You bought a new car. You took it out for a ride. a tree falls before you. You brake, but the car proceeded to hit the tree anyway. You call the car company and talk to their engineers. One of them ask. 'Did this happen on a Friday evening, when it was raining?' You say 'Yes, how do you know?' The engineer replies. "Our brakes does not work on rainy Friday evenings. If you REALLY want to brake on a rainy Friday eveni…

It's not the complexity of the car manual, but the falling tree that I fear.
Post reply on HN