This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:intval [2017/04/04 13:55] jeff |
uphp:functions:intval [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
< | < | ||
- | Return the < | + | < |
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | <span style=" | + | <span style=" |
- | < | + | <span style=" |
+ | <span style=" | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
</ | </ | ||
- | Return the < | + | Return the < |
====Parameter==== | ====Parameter==== | ||
- | < | + | < |
- | ====Return | + | ====Return |
< | < | ||
Line 30: | Line 31: | ||
====Example==== | ====Example==== | ||
- | **Convert the < | + | ===Convert the float ' |
<code php> | <code php> | ||
Line 42: | Line 43: | ||
The above example will output: | The above example will output: | ||
< | < | ||
- | The integer value of 1.550000 is 1 | + | The integer value of 1.550000 is 2 |
</ | </ | ||
====See Also==== | ====See Also==== | ||
- | [[floatval()]] - Return the floating point value of a < | + | [[floatval()]] - < |
- | [[strval()]] - Return the < | + | [[strval()]] - < |
- | [[is_numeric()]] - Return 1 if the value is numeric (< | + | [[is_numeric()]] - < |
- | [[ieee754toint()]] - Take a floating point value and return an IEEE-754 encoded | + | [[ieee754toint()]] - < |
- | + | ||
- | [[inttoieee754()]] - Take an IEEE-754 encoded | + | |
[[uphp: | [[uphp: | ||
+ | |||
+ | ====Note==== | ||
+ | |||
+ | In firmware versions released before 8/14/17 this function returned the integer value by truncating the fractional component of the number (it did not round up or down): | ||
+ | |||
+ | < | ||