ez.no / exponential / documentation / reference / template operators / variables / is_object
$input|is_object( test )
| Name | Type | Description | Required |
|---|---|---|---|
| test | any | Variable to be checked. | only if input is omitted |
true or false, see description for more details.
Returns true if the input or the first parameter is an object (as opposed to a simple type like integer or float). If both input and parameter are supplied, it is the parameter that will be evaluated.
{"My string"|is_object}
The example above returns false.
{let my_variable=256} {$my_variable|is_object( $my_object) } {/let}
The example above returns true if $my_object is an object (false if not an object).
{let my_variable=256} {$my_object|is_object( $my_variable) } {/let}
The example above returns false even if $my_object is an object. It is the parameter that will be evaluated (the type of the input has nothing to say).
log in or create a user account to comment.
Comments