is_float(3) php man page | unix.com

Man Page: is_float

Operating Environment: php

Section: 3

IS_FLOAT(3)								 1							       IS_FLOAT(3)

is_float - Finds whether the type of a variable is float

SYNOPSIS
bool is_float (mixed $var)
DESCRIPTION
Finds whether the type of the given variable is float. Note To test if a variable is a number or a numeric string (such as form input, which is always a string), you must use is_numeric(3).
PARAMETERS
o $var - The variable being evaluated.
RETURN VALUES
Returns TRUE if $var is a float, FALSE otherwise.
EXAMPLES
Example #1 is_float(3) example <?php if (is_float(27.25)) { echo "is float "; } else { echo "is not float "; } var_dump(is_float('abc')); var_dump(is_float(23)); var_dump(is_float(23.5)); var_dump(is_float(1e7)); //Scientific Notation var_dump(is_float(true)); ?> The above example will output: is float bool(false) bool(false) bool(true) bool(true) bool(false)
SEE ALSO
is_bool(3), is_int(3), is_numeric(3), is_string(3), is_array(3), is_object(3). PHP Documentation Group IS_FLOAT(3)
Related Man Pages
is_numeric(3) - php
isset(3) - php
is_scalar(3) - php
class_alias(3) - php
empty(3) - php
Similar Topics in the Unix Linux Community
Perl data type checking
awk with variable
If echo statement return false
Output checker setting variable to TRUE or FALSE
Replace substring from a string variable