note 15966 rejected from function.is-float by zak
| From: | zak@php.net | Date: | Wed, 10 Oct 2001 15:57:07 +0000 |
| Subject: | note 15966 rejected from function.is-float by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-18785@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;
}