ez.no / exponential / documentation / reference / template operators / variables / is_integer
$input|is_integer( test )
| Name | Type | Description | Required |
|---|---|---|---|
| test | any | Variable to check. | only if input is omitted |
true or false, see description for details.
This operator simply checks if a variable contains an integer value or not. The operator returns true if the input or the first parameter is an integer. If both input and parameter are supplied, it is the parameter that will be evaluated.
{let my_variable="3.1415"} {$my_variable|is_integer} {/let}
The example above returns false.
{let my_variable="3.1415"} {$my_variable|is_integer(555)} {/let}
The example above returns true.
log in or create a user account to comment.
Comments