3 ms·
Do you know why that is? php > echo md5('240610708'); 0e462097431906509019562988736854 php > echo md5('QNKCDZO'); 0e830400451993494058024219903391
by cyberbanjo 5y ago
Do you know why that is?
php > echo md5('240610708');
0e462097431906509019562988736854
php > echo md5('QNKCDZO');
0e830400451993494058024219903391
- dangson 5y agoHere is the explanation: https://www.php.net/manual/en/function.md5.php#123392 https://www.php.net/manual/en/function.md5.php#123392
- deleted 5y ago[deleted]
- wildrhythms 5y agoWould this be avoided by using a string comparison function? https://www.php.net/manual/en/function.strcmp.php https://www.php.net/manual/en/function.strcmp.php
- cyberbanjo 5y agoYes. php > echo strcmp(md5('240610708'), md5('QNKCDZO')); -4
- trog 5y agoYes, or you can use ===, which will check the type as well. I am trying to get in the habit of using === everywhere now.