Re:PHP: md5('240610708') == md5('QNKCDZO')
by tellor on Monday May 04, 2015 @07:27AM
(#9485482)
This is well-known PHP-trick.
Use === to right result.
[ Parent
| on HN ]
> This is well-known PHP-trick. Use === to right result.
Everybody knows PHP is a trickly-typed language. Read the docs people or PHP will take advantage of your gullible ass.
perhaps ==== operator must reserved
Absolutely! However, we must be careful not to define it in a too predictable way lest we violate the Principle of Most Surprise.
php_real_equivalence_4()
Exactly!
But it must invoke with additional NULL-parameter to achieve real effect and analyse return value for TRUE, FALSE, NULL:
php_real_equivalence_4($x, $y, null);
Re:PHP: md5('240610708') == md5('QNKCDZO')
by DonHopkins on Tuesday May 05, 2015 @09:00AM
(#9492198)
Except they had to call it php_real_equivalnce_4() because php_real_equivalence_4() was taken.