On Thu, 17 May 2001, Sebastian Bergmann wrote:
> Hey there,
>
> I was just bitten by a - IMHO - weirdness with boolean values:
>
>$foo = -1;
> if ($foo) { print "bar"; }
> ?>
>
> The code above print 'bar'. I would expect if($x) t return true if $x
> is an integer an
Hey there,
I was just bitten by a - IMHO - weirdness with boolean values:
The code above print 'bar'. I would expect if($x) t return true if $x
is an integer and greater that zero. This is what my intuition tells me
:)
Just a thought,
Sebastian
--
sebastian bergmann