Just a bit more info: when you do this...
echo ('result:'.$a == $b);
...the result of the comparison, which will be a Boolean true or false, will automatically be type-cast to a string as a result of the concatenation operator (and if that weren't involved, then by the echo itself). As described in the manual, "A boolean TRUE value is converted to the string "1". Boolean FALSE is converted to [FONT=Courier New]''[/FONT] (the empty string)."