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
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
=== , on the other hand, works like this:
if left-hand-type != right-hand-type
result is false
else
compare unconverted left-hand-argument to unconverted
right-hand-argument
--
Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de +49-711-99091-77
Besuchen Sie uns auf der CeBIT 2001 - in Halle 6 Stand F62/4
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]