| Author |
equivalence relation, makes no sense here
|
colin shuker
Ranch Hand
Joined: Apr 11, 2005
Posts: 712
|
|
Hi, I'm confused...
10 === 10.0 is FALSE, because different data types (int and float)
But when I do..
$a = 10;
$b = 10.0;
$a === $b is TRUE, but they have different data types, don't they?
I did echo gettype(10.0); and this says double.
Can anyone explain, I need to clear this up. Thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56205
|
|
|
Please KeepItDown
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
colin shuker
Ranch Hand
Joined: Apr 11, 2005
Posts: 712
|
|
|
Nevermind, I found an error in my code, $b = &$a, which made the types the same.
|
 |
 |
|
|
subject: equivalence relation, makes no sense here
|
|
|