Re: [PHP4BETA] is string numeric
| From: | Andrei Zmievski | Date: | Thu, 16 Mar 2000 16:02:45 +0000 |
| Subject: | Re: [PHP4BETA] is string numeric | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12248@lists.php.net to get a copy of this message | ||
All,
There is is_numeric() now as of 5 minutes ago.
On Thu, 16 Mar 2000, Joey wrote:
>
> Faisal:
> I do not think that any of the functions you listed do what this
> guy is looking for, do they?
>
> E.g., is_integer is our best shot....
> <?php
> $a = "12345";
>
> print "is_integer(\$a)? " . is_integer($a) . "\n\n";
> ?>
>
> Returns:
>
> is_integer($a)?
>
>
> If I am not mistaken, this guy is looking for PHP equiv. to C's
> isdigit.
> --Joey Smith
>
> On Thu, 16 Mar 2000, Faisal Nasim wrote:
>
> > LI. Variable functions
> > Table of Contents
> > gettype - Get the type of a variable.
> > intval - Get integer value of a variable.
> > doubleval - Get double value of a variable.
> > empty - determine whether a variable is set
> > is_array - Finds whether a variable is an array.
> > is_double - Finds whether a variable is a double.
> > is_float - Finds whether a variable is a float.
> > is_int - Find whether a variable is an integer.
> > is_integer - Find whether a variable is an integer.
> > is_long - Finds whether a variable is an integer.
> > is_object - Finds whether a variable is an object.
> > is_real - Finds whether a variable is a real.
> > is_string - Finds whether a variable is a string.
> > isset - determine whether a variable is set
> > settype - Set the type of a variable.
> > strval - Get string value of a variable.
> > unset - Unset a given variable
> >
> > Enjoy!
> >
> > ----- Original Message -----
> > From: "Harold" <harold@salt.xgroup.de>
> > To: "php4beta" <php4beta@lists.php.net>
> > Sent: Thursday, March 16, 2000 3:16 PM
> > Subject: [PHP4BETA] is string numeric
> >
> >
> > : i didnt find this function in the manual.. in coldfusion there is a
> > : isnumeric function which returns true or false if a string only contains
> > : numbers.. i think this would be a nice function to include in php? :)
> > :
>
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>
-Andrei
* We are not a clone. *