PHP Manual
Prev |  | Next

# intval

intval -- Get integer value of a variable.

## Description

`int intval`(mixed var, int [base] );

Returns the integer value of `var`, using the specified base for the conversion (the default is base 10).

`var` may be any scalar type. You cannot use intval() on arrays or objects.

See also doubleval(), strval(), settype() and Type juggling.

Prev | Home | Next
gettype | Up | is_array