This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
uphp:functions:is_int [2017/03/09 15:49] jeff created |
uphp:functions:is_int [2021/09/13 05:57] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======is_int====== | ======is_int====== | ||
| + | |||
| < | < | ||
| - | Return 1 if the variable is an integer | + | Check if a variable is an < |
| ====Description==== | ====Description==== | ||
| - | <well size=" | + | |
| - | <span style=" | + | <well size=" |
| - | < | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| + | <span style=" | ||
| </ | </ | ||
| - | Return 1 (true) | + | Check to see if a variable or value is of type < |
| - | ====Parameters==== | + | ====Parameter==== |
| - | < | + | |
| - | ====Return | + | < |
| - | 1 if an integer, 0 if not an integer | + | |
| + | ====Return | ||
| + | |||
| + | < | ||
| + | |||
| + | ====Examples==== | ||
| - | ====Example==== | ||
| <code php> | <code php> | ||
| <? | <? | ||
| - | $x=1; | + | |
| - | print(is_int($x)); | + | print(is_int($x)); |
| - | $y=1.0; | + | $y=1.0; |
| - | print(is_int($y)); | + | print(is_int($y)); |
| - | $z=" | + | $z=" |
| - | print(is_int($z)); | + | print(is_int($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_float()]] - Return 1 if the variable is a float | ||
| - | [[is_numeric()]] - Return 1 if the value is numeric (integer, float or string) | + | [[is_float()]] - Check if a variable is a < |
| + | |||
| + | [[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: | ||