note 15966 added to function.is-float
| From: | bens at benjamindsmith dot com | Date: | Wed, 10 Oct 2001 15:54:31 +0000 |
| Subject: | note 15966 added to function.is-float | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18783@lists.php.net to get a copy of this message | ||
I have a function that seems to reliably test whether a variable COULD be real. (rather than
"IS" - see my note above)
function couldbe_real($in)
{
$arch="$in";
if ($arch!=$in+0.0."")
return false;
$in=$in+0.0;
if (is_real($in))
return true;
}
--
http://www.php.net/manual/en/function.is-float.php
http://master.php.net/manage/user-notes.php?action=edit+15966
http://master.php.net/manage/user-notes.php?action=delete+15966
http://master.php.net/manage/user-notes.php?action=reject+15966