From:             [EMAIL PROTECTED]
Operating system: Windows95
PHP version:      4.0.6
PHP Bug Type:     Performance problem
Bug description:  Inconsistent display of logical results

<?php

$n1=10;
$n2=8;

echo '$n1<$n2 is '.($n1<$n2)."<br>";
echo '$n1<=$n2 is '.($n1<=$n2)."<br>";
echo '$n1>$n2 is '.($n1>$n2)."<br>";
echo '$n1>=$n2 is '.($n1>=$n2)."<br>";
echo '$n1==$n2 is '.($n1==$n2)."<br>";
echo '$n1!=$n2 is '.($n1!=$n2)."<br>";
echo '$n1<>$n2 is '.($n1<>$n2)."<br>";
echo '$n1===$n2 is '.($n1===$n2)."<br>";
echo '$n1!==$n2 is '.($n1!==$n2)."<br>";

echo "<br>";

$bool=($n1==$n2 || $n1===$n2);
echo '$bool=($n1==$n2 || $n1===$n2);'."<br>";
echo '$bool is '.$bool;

?>

---

This code is a simple run-through of the logical operators. The problem is
that 0 is never displayed normally, but if you use boolean logic, then it
is possible for 0 to be displayed. I prefer the 0 being displayed.
-- 
Edit bug report at: http://bugs.php.net/?id=13859&edit=1


-- 
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]

Reply via email to