SPAM: [thelist] PHP is_nan

Mark Joslyn Mark.Joslyn at
Wed Jul 2 15:32:44 CDT 2003

>From my understanding, the is_nan is only a test to determine whether the
value is a number - so only numbers will validate through this check. If you
want to check to see if the string is alphanumeric, you would use

$test = "string";

if (is_numeric($test)) {
	echo "this is a number";
} else {
	echo "this is not a number"

I vould be off base though!


-----Original Message-----
From: thelist-bounces at
[mailto:thelist-bounces at]On Behalf Of fstorr
Sent: Wednesday, July 02, 2003 11:44 AM
To: thelist at
Subject: SPAM: [thelist] PHP is_nan

Hi all

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))

	echo "this works";


	echo "don't work";

And I get back:

Warning: is_nan() expects parameter 1 to be double, string given in
(address of the page)




* * Please support the community that supports you.  * * conference in London, July 25-27 2003.  Register today at

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to:
Workers of the Web, evolt !

More information about the thelist mailing list