Query: is_float
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IS_FLOAT(3) 1 IS_FLOAT(3) is_float - Finds whether the type of a variable is floatSYNOPSISbool is_float (mixed $var)DESCRIPTIONFinds 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).PARAMETERSo $var - The variable being evaluated.RETURN VALUESReturns TRUE if $var is a float, FALSE otherwise.EXAMPLESExample #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 ALSOis_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 |
---|
gettype(3) - php |
isset(3) - php |
cairo_has_current_point(3) - php |
is_string(3) - php |
var_dump(3) - php |
Similar Topics in the Unix Linux Community |
---|
comparing two float values |
How to count number of occurrences of a "|" from a variable? |
float comparison |
ksh : find value type |
Perl data type checking |