User Tools

Site Tools


uphp:functions:is_float

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uphp:functions:is_float [2017/03/18 19:34]
jeff
uphp:functions:is_float [2021/09/13 05:57]
Line 1: Line 1:
-======is_float====== 
-<badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> 
- 
-Return 1 if the variable is a float 
- 
-====Description==== 
-<well size="sm"><html><span style="font-size:125%;color:green;">int 
-<span style="color:black;"></html>[[is_float]] 
-<html>( 
-<span style="color:green;">mixed 
-<span style="color:blue;">$variable 
-<span style="color:black;">) 
-</html></well> 
- 
-Check if a variable or value is a floating point number 
- 
-====Parameters==== 
-<html><span style="color:blue;"><b>variable</b><span style="color:black;"></html>:  Variable or expression to be evaluated 
- 
-====Return Value==== 
-1 (true) if float, 0 (false) if not a float 
- 
-====Examples==== 
-<code php> 
-<? 
-  $x=1; 
-  print(is_float($x)); // outputs 0, $x is an integer 
-  $y=1.0; 
-  print(is_float($y)); // outputs 1, $y is a float 
-  $z="1.0"; 
-  print(is_float($z)); // outputs 0, $z is a string 
-?> 
-</code> 
- 
-====Notes==== 
-This function checks ONLY the type of the variable, not the data that it holds! 
- 
-To test if a variable contains a number or is a numeric string (such as form input, which is always a string), you should use [[is_numeric()]]. 
- 
-====See Also==== 
-[[is_int()]] - Return 1 if the variable is an integer 
- 
-[[is_numeric()]] - Return 1 if the value is numeric (integer, float or numeric string) 
- 
-[[is_string()]] - Return 1 if the variable is a string 
- 
-[[is_array()]] - Return 1 if the variable is an array 
- 
-[[isset()]] - Return 1 if the variable exists 
- 
-[[uphp:variables|uPHP Variable Types and Limits]] 
  
uphp/functions/is_float.txt · Last modified: 2021/09/13 05:57 (external edit)