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/13 07:28] jeff |
uphp:functions:intval [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | < | + | |
<span style=" | <span style=" | ||
- | <span style=" | + | <span style=" |
- | </ | + | <span style=" |
- | [[intval]] ( | + | |
- | < | + | |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
- | </ | + | </ |
- | </ | + | |
- | Return the < | + | Return the < |
====Parameter==== | ====Parameter==== | ||
Line 25: | Line 21: | ||
< | < | ||
- | ====Return | + | ====Return |
< | < | ||
Line 35: | Line 31: | ||
====Example==== | ====Example==== | ||
- | ===Convert the float ' | + | ===Convert the float ' |
<code php> | <code php> | ||
Line 47: | 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 |
</ | </ | ||
Line 61: | Line 57: | ||
[[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): | ||
+ | |||
+ | < | ||