Re: Number Comparison..Languange Problem???
| From: | Ignacio Vazquez-Abrams | Date: | Thu, 28 Dec 2000 17:45:10 +0000 |
| Subject: | Re: Number Comparison..Languange Problem??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32112@lists.php.net to get a copy of this message | ||
On Thu, 28 Dec 2000, Reuben D Budiardja wrote:
>
> Suppose I have something like:
> $var1 = 0111;
> $var2 = 111;
>
> and I do:
>
> if($var1 == $var2)
> echo "TRUE";
> else
> echo "FALSE";
>
> that will return false. Isn't that supposse to be true, since 0111 is
> essentially 111, and they both are the same type (ie. number)? the
> variables are not define as string, so why do they give me FALSE in the
> comparison?
>
> Thanks for any help
> Reuben D. Budiardja
>
0111 is actually 73 (64+8+1), since the initial 0 means that the number is in
octal.
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>