Alan van den Bosch wrote:
> This issue arises from the loose typing in PHP with the introduction of
> first class boolean type (the true and false keywords), from my
> understanding the sematics being applied here are as follows (poetic
> applied liberally);
> == 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
> When applied to strings, a 'false' string is zero length or contains '0',
> all other strings are 'true'.
> [please dont ask 'what if the string is NULL... ;-)]
> If you dont want your terms to be treated as (type cast to) boolean values
> use the strict equallity operator ===
> > > I can not see any description of this behavior in the
> > > manual. The string type section descibes only what is
> > > happen if a string is converted.
> The manual doesnt seem very clear on this at all, but == behaves something
> like ^(A xor B)

While I certainly appreciate the support :) - I am not sure that this is a
correct appraisal of the situation.  We should take a look at the source
code and see what it actually does.  My impression is that it should cast
the values as strings and then compare the strings.


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