Hi, I'm trying to trace a bug in osCommerce 3, but it uses "===" in many of it's if statements. What is the behaviour of "==="? I see it first time and php manual doesn't mention it.
Is it's functionality same as "=="?
if === syntax
Moderator: General Moderators
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: if === syntax
It's the same as == but with a little bit more, it actually compares the datatype as well as the datavalue
if (0 == 0.0) //compares an integer to a float, will return true
if (0 === 0.0) //compares an integer to a float, will return false
And the PHP manual mentions it plenty if you look
if (0 == 0.0) //compares an integer to a float, will return true
if (0 === 0.0) //compares an integer to a float, will return false
And the PHP manual mentions it plenty if you look