Hacker News new | ask | show | jobs
by wildrhythms 1670 days ago
Would this be avoided by using a string comparison function?

https://www.php.net/manual/en/function.strcmp.php

2 comments

Yes, or you can use ===, which will check the type as well. I am trying to get in the habit of using === everywhere now.
Yes.

  php > echo strcmp(md5('240610708'), md5('QNKCDZO'));
  -4