This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:is_float [2017/03/09 16:48] jeff |
uphp:functions:is_float [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
======is_float====== | ======is_float====== | ||
+ | |||
< | < | ||
- | Return 1 if the variable is a float | + | Check if a variable is a < |
====Description==== | ====Description==== | ||
- | <well size=" | + | |
- | <span style=" | + | <well size=" |
- | < | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
+ | <span style=" | ||
</ | </ | ||
- | Check if a variable or value is a floating point number | + | Check to see if a variable or value is of type < |
- | ====Parameters==== | + | ====Parameter==== |
- | < | + | |
- | ====Return | + | < |
- | 1 (true) if float, 0 (false) if not a float | + | |
+ | ====Return | ||
+ | |||
+ | < | ||
====Examples==== | ====Examples==== | ||
+ | |||
<code php> | <code php> | ||
<? | <? | ||
- | $x=1; | + | |
- | print(is_float($x)); | + | print(is_float($x)); |
- | $y=1.0; | + | $y=1.0; |
- | print(is_float($y)); | + | print(is_float($y)); |
- | $z=" | + | $z=" |
- | print(is_float($z)); | + | print(is_float($z)); |
?> | ?> | ||
</ | </ | ||
- | ====Note==== | + | ====Notes==== |
- | To test if a variable | + | |
+ | This function checks ONLY the type of the variable, not the data that it holds! | ||
+ | |||
+ | To test if a variable | ||
====See Also==== | ====See Also==== | ||
- | [[is_int()]] - Return 1 if the variable is an integer | ||
- | [[is_numeric()]] - Return 1 if the value is numeric (integer, float or string) | + | [[is_int()]] - Check if a variable is an < |
+ | |||
+ | [[is_numeric()]] - < | ||
+ | |||
+ | [[is_string()]] - Check if a variable is a < | ||
- | [[is_string()]] - Return 1 if the variable is a string | + | [[is_array()]] - Check if a variable is an < |
- | [[is_array()]] - Return 1 if the variable | + | [[isset()]] - Check if a variable |
[[uphp: | [[uphp: | ||