I was looking at the PHP hash_equals() function here: https://php.net/manual/en/function.hash-equals.php
I came across the following code:
function hash_equals($a, $b) {
$ret = strlen($a) ^ strlen($b);
$ret |= array_sum(unpack("C*", $a^$b));
return !$ret;
}
What does return !$ret
return?
Edit: I know "!" is the logical operator "NOT". However, I wanted to know what it's doing to the return value. Does it return the opposite of the value, or make it false? I read the entire duplicate that this post is linked to, and still don't understand.