Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within PHP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
PHP
equivalence relation, makes no sense here
colin shuker
Ranch Hand
Posts: 750
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Sheriff
Posts: 67746
173
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please
KeepItDown
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
colin shuker
Ranch Hand
Posts: 750
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Nevermind, I found an error in my code, $b = &$a, which made the types the same.
We find this kind of rampant individuality very disturbing. But not this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to best convert for example 2.29 -> 2.3
explain why the following will compile
about a Math.sqrt()
== question
Why i am getting different output!!!!!
More...