The == operator is best for comparing numbers, or for comparing for identical references (references to the same data object). The example here didn't give much to go on.
If $var1 and $var2 are references, the $var1 eq $var2 would also work: it discovers that "HASH(0x804c88c)" eq "HASH(0x804c88c)", but takes the extra time to stringize both sides.
The guy was talking about comparing $name and $pass, so my guess is that the latter (which I presume to be the hash value) is a string. Comparing "foo"=="bar" will return true, which isn't worth much as a password check.