Re: note 15966 added to function.is-float

From: Date: Wed, 10 Oct 2001 15:58:09 +0000
Subject: Re: note 15966 added to function.is-float
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-18786@lists.php.net to get a copy of this message
On October 10, 2001 09:54 am, bens@benjamindsmith.com wrote: > 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; > } Hi Ben, Thanks for the notes. See the built-in function is_numeric() -- Zak Greant PHP Quality Assurance Team http://qa.php.net/ "We must be the change we wish to see." - M. K. Ghandi

« previous php.notes (#18786) next »