At 19:34 9/2/2001, Hartmut Holzgraefe wrote:
>Alan van den Bosch wrote:
> > == is (has become?) a boolean logic operator, dealing in terms of  'true'
> > and 'false' values, so its terms are type cast to either 'true' or 'false'.
> > When applied to strings, a 'false' string is zero length or contains '0',
> > all other strings are 'true'.
>the result of == is boolean, not the arguments
>expected behaviour could be:
>if left-hand-type != right-hand-type
>   convert right-hand-argument to left-hand type
>compare left-hand-argument to possibly converted right-hand-argument

There's no (and shouldn't be any) significance in the order of the arguments.

>additionaly, IMHO,
>as php has to deal with html forms a lot and html has no
><input type=numeric> there are a lot of places where a string
>that qualifies as is_numeric is silently treated as a numeric argument

Right, that's why PHP automatically compares two string-like strings as if 
they were numbers.


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