ez.no / exponential / documentation / reference / template operators / variables / is_numeric
$input|is_numeric( 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 the input or the supplied parameter. The operator returns true if the input or the first parameter is a number or a numberic string (a string consisting of numbers). If both input and parameter are supplied, the it is the parameter that will be evaluated.
{"2506"|is_numeric}
The example above returns true.
{let my_variable=256} {$my_variable|is_numeric( "Hahaha" } {/let}
The example above returns false.
{let my_variable=256} {"Hehe"|is_object( $my_variable) } {/let}
The example above returns true.
log in or create a user account to comment.
Comments