Bug? PHP says (7.11 == 7.11) is FALSE!
Posted: Sun Jun 23, 2002 7:43 pm
Hi,
Take a look at this code:
That results in:
double-double
[7.11][7.11]1
What does that say? Well, first, both variables ($sec and $Sub2Secs['services.email.compose']) are of the same type (double). Also, both variables have the same value. So why the heck does PHP return "true" to the negation of the equality? I mean, is like if PHP returned false for "7.11 == 7.11".
Maybe I'm missing something really simple... And I hope so
Thanks in advance.
Take a look at this code:
Code: Select all
$sec = $Cur_Sub2Sec;
settype($sec, 'double');
echo gettype($sec) . '-' . gettype($Sub2Secsї'services.email.compose']);
echo "<br>ї".$sec."]";
echo "ї".$Sub2Secsї'services.email.compose']."]";
echo !($sec == $Sub2Secsї'services.email.compose']);double-double
[7.11][7.11]1
What does that say? Well, first, both variables ($sec and $Sub2Secs['services.email.compose']) are of the same type (double). Also, both variables have the same value. So why the heck does PHP return "true" to the negation of the equality? I mean, is like if PHP returned false for "7.11 == 7.11".
Maybe I'm missing something really simple... And I hope so
Thanks in advance.