int

Description

Converts a string to an integer.

Copy
 integer int( mixed input )

Returns the value, cast to an integer. If you pass a string, will convert to an integer. If you pass a floating-point number, will return the number rounded down.

Example

 {int(3)} = 3 {int(3.3)} = 3 {int("3")} = 3 {int("3.3")} = 3