The gmp_intval() function returns the integer value of a variable.
Syntax
intval ( $var, $base )
Parameters
var − The variable which needs to be converted to its integer value.
base − The base for conversion of $var to its corresponding integer.
Return
The gmp_intval() function returns the integer value for var.
Example
The following is an example −
<?php $var = "180"; echo intval($var, 8); ?>
Output
The following is the output −
1