At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
>ID: 9186
>User Update by: [EMAIL PROTECTED]
>Status: Bogus
>Bug Type: Scripting Engine problem
>Description: string compare with "==" does not work correctly
>I think there is no reason to convert any type if both
>operands of the comparision are of the same type. It costs
>time and it's completely not necessary. This is a bug.

No, it's not a bug.  It's definitely an intended behavior.
PHP does it's best to do the 'right thing' in the most common 
cases.  Because of the way it works, effectively, comparing strings that 
'look like numbers' as if they were numbers makes life much, much easier.
If you want to enforce a string comparison, use strcmp().


PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to