WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Return the integer value of a number or string
Return the integer value by rounding
$value: A string with a leading number, or a number (int or float)
Integer value, or:
The maximum value possible is a signed integer in the range -2147483648 to 2147483647.
<? $f=1.55; $i=intval($f); print("The integer value of ".$f." is ".$i); ?>
The above example will output:
The integer value of 1.550000 is 2
floatval() - Return the float value of a number or string
strval() - Return the string equivalent of a number
is_numeric() - Check if a value is numeric (int, float or numeric string)
ieee754toint() - Convert a float value to an IEEE-754 encoded integer (32 bit)
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):
WMPRO, WMMINI FW < 1.1068 WMMEGA FW < 2.1068