From: "Kelly Hallman" <[EMAIL PROTECTED]>

> On Tue, 6 Jan 2004, Ivo Pletikosic wrote:
> > $data = 'NANC';
> > if(is_numeric($data) && $data < 0) { die('Not OK'); }
>
> Interesting problem, one of the first legit oddities I've seen since
> joining the list.  Anyway, in addition to your workaround, casting the
> variable as an int also appears to result in the desired behavior:
>
> (int)"NANC" < 0 == false

This all kind of begs the question of why you'd check if a "string" was less
than zero, anyhow, doesn't it???

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to