ID:               48935
 User updated by:  ultigma at hotmail dot com
 Reported By:      ultigma at hotmail dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Vista
 PHP Version:      5.2.10
 New Comment:

Forgot to add, How can i change the result from 0 and 1 to False and 
True?


Previous Comments:
------------------------------------------------------------------------

[2009-07-15 20:51:30] ultigma at hotmail dot com

Description:
------------
New to PHP but I'm sure this is just a small problem  but i can't find
a 
solution to it anywhere. Comparisons that equate to false are not 
returned to the browser at all and True values are displayed as 1.
I would have thought that, like most languages ($num1 == $num2) would 
return False.

Reproduce code:
---------------
<?php
$num1 = 8;
$num2 = 21;

echo "Is " . $num1 . " equal to " . $num2 . " = " . ($num1 == $num2);
echo "<br />Is " . $num1 . " less than " . $num2 . " = " . ($num1 <
$num2);
echo "<br />Is " . $num1 . " greater than " . $num2 . " = " . ($num1 >
$num2);
echo "<br />Is " . $num1 . " less than or equal to " . $num2 . " = " .
($num1 <= $num2);
?>

Expected result:
----------------
Is 8 equal to 21 = False
Is 8 less than 21 = True
Is 8 greater than 21 = False
Is 8 less than or equal to 21 = True

Actual result:
--------------
Is 8 equal to 21 = 
Is 8 less than 21 = 1
Is 8 greater than 21 = 
Is 8 less than or equal to 21 = 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48935&edit=1

Reply via email to