This shows you the differences between two versions of the page.
uphp:functions:floatval [2017/04/06 12:31] jeff |
uphp:functions:floatval [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======floatval====== | ||
- | |||
- | < | ||
- | |||
- | Return the < | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | [[floatval]] ( | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | </ | ||
- | |||
- | Return the floating point equivalent | ||
- | |||
- | ====Parameter==== | ||
- | |||
- | < | ||
- | |||
- | ====Return Value==== | ||
- | |||
- | Floating point value, or: | ||
- | * 0 on failure (for example, a < | ||
- | * 0 on empty < | ||
- | * 1 on non-empty < | ||
- | |||
- | ====Example==== | ||
- | |||
- | **Convert the integer ' | ||
- | |||
- | <code php> | ||
- | <? | ||
- | $x=1; | ||
- | $f=floatval($x); | ||
- | print(" | ||
- | ?> | ||
- | </ | ||
- | |||
- | The above example will output: | ||
- | < | ||
- | The float value of 1 is 1.000000 | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[intval()]] - Return the < | ||
- | |||
- | [[strval()]] - Return the < | ||
- | |||
- | [[is_numeric()]] - Check if a value is numeric (< | ||
- | |||
- | [[ieee754toint()]] - Take a floating point value and return an IEEE-754 encoded < | ||
- | |||
- | [[inttoieee754()]] - Take an IEEE-754 encoded < | ||
- | |||
- | [[uphp: | ||