you should also consider what it is you mean by "match" --
$a = 1; // integer
$b = '1'; // string
if( $a == $b ){ print "match!"; }else{ print "don't match"; } // prints "match!"
if( $a === $b ){ print "match!"; }else{ print "don't match"; } // prints "don't match"
this applies to more situations than you might think -
for example, some functions have return values that are "equal" ( == ) but not "identical" ( === ).