This shows you the differences between two versions of the page.
uphp:functions:intval [2017/04/11 15:24] jeff |
uphp:functions:intval [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======intval====== | ||
- | |||
- | < | ||
- | |||
- | Return the < | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | [[intval]] ( | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | </ | ||
- | |||
- | Return the < | ||
- | |||
- | ====Parameter==== | ||
- | |||
- | < | ||
- | |||
- | ====Return Value==== | ||
- | |||
- | < | ||
- | * 0 on failure (for example, strings without a numeric in the leftmost characters) | ||
- | * 0 on empty < | ||
- | * 1 on non-empty < | ||
- | The maximum value possible is a signed < | ||
- | |||
- | ====Example==== | ||
- | |||
- | **Convert the float ' | ||
- | |||
- | <code php> | ||
- | <? | ||
- | $f=1.55; | ||
- | $i=intval($f); | ||
- | print(" | ||
- | ?> | ||
- | </ | ||
- | |||
- | The above example will output: | ||
- | < | ||
- | The integer value of 1.550000 is 1 | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[floatval()]] - Return the < | ||
- | |||
- | [[strval()]] - Return the < | ||
- | |||
- | [[is_numeric()]] - Check if a value is numeric (< | ||
- | |||
- | [[ieee754toint()]] - < | ||
- | |||
- | [[uphp: | ||