Re: if("NANC" < 0) - always evaluates TRUE...
| From: | David Otton | Date: | Tue, 06 Jan 2004 19:28:40 +0000 |
| Subject: | Re: if("NANC" < 0) - always evaluates TRUE... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173884@lists.php.net to get a copy of this message | ||
On Tue, 6 Jan 2004 10:57:52 -0800, you wrote:
>...no matter what follows the NANC...seems like a bug.
>
>if("NA" < 0)
>{
> print("err 1\n");
>}
>
>if("NAN" < 0)
>{
> print("err 2\n");
>}
>
>if("NANC" < 0)
>{
> print("err 3\n");
>}
if ("NANC" < 0)
{
echo ("one");
} else {
echo ("two");
}
outputs "two" here, as expected. PHP 4.3.2 over Win2000.
Maybe you're seeing a side-effect of a "Not A Number" magic value being
"intelligently"-evaluated.