intval
intval
(PHP 4, PHP 5, PHP 7)
intval — Get the integer value of a variable
Description
int intval ( mixed $var [, int $base = 10 ] )
Returns the integer value of var
, using the specified base
for the conversion (the default is base 10). intval() should not be used on objects, as doing so will emit an E_NOTICE
level error and return 1.