|
Posted by Oli Filth on 10/09/77 11:18
Paul Wellner Bou said the following on 11/06/2005 11:35:
> Hi,
>
> Chris Hope wrote:
>
>> mrbog wrote:
>>
>>> if (0 == 'asdfasdf' ) echo 'WHAT THE FUCK??????????';
>>
>>
>> I posted something about this the other day.
>>
>> When comparing a string with a number the string is first evaluated as a
>> number, which in the case of the above is example is 0. So in effect
>> you are comparing 0 with 0.
>
>
> Sorry, this is not correct. The string and the number will be casted to
> a boolean value.
Wha?? Since when does that ever happen? If you did something like:
if (4 == 7) ...
4 and 7 are most definitely *not* converted to Booleans. The same
applies for the example above.
--
Oli
Navigation:
[Reply to this message]
|