Q:

Why does this evaluate to true?

Possible Duplicate:
Why does (0 == ‘Hello’) return true in PHP? 

<?php
echo ('names' == 0) ? 1 :0;
?>

Evaluates to TRUE
If I add an extra equals sign it will work, but this is counter intuitive.
<?php
echo ('names' === 0) ? 1 :0;
?>

Evaluates to FALSE
<?php
echo ('names' == FALSE) ? 1 :0;
?>

Evaluates to FALSE
Also found this:
Why does 1234 == '1234 test' evaluate to true?

A:

The reason is that the numerical value of the string 'names' is 0, but the boolean value is true (as far as I know, any non-empty string that's not also '0' or something similar is equivalent to true in PHP).

