[thelist] PHP is_nan

Mike Migurski mike-evolt at teczno.com
Wed Jul 2 15:53:58 CDT 2003


>This is probably a real newbie error, but PHP's is_nan function is not
>playing for me.  I've got this as a test:
>
><?
>$tester = "hello";
>
>if (is_nan($tester))

is_nan() is used to check for possible infinite values of floats, so it
expects arguments of that type (see acos(1.01) example given at
http://php.net/is_nan). If you want to check whether something is numeric,
use is_numeric.

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html



More information about the thelist mailing list