ez.no / exponential / documentation / reference / template operators / logic / and
and( value1 [, value2 [, ... ] ] )
| Name | Type | Description | Required |
|---|---|---|---|
| value1 | mixed | Value of any kind | yes |
| value2 | mixed | Value of any kind | no |
| ... | mixed | Value of any kind | no |
Boolean
Evaluates all parameter values until one is found to be false. If no false value is found the operator returns true, otherwise false.
Evaluation is done the following way:
If input value is array, it will be evaluated as true if it has one or more elements
If input value is numeric, it will be evaluated as true if value is non-zero
If input value is NULL, it will be evaluated as false
If input value is an object, it will be evaulated as true if the object have the methods "attributes" and "attribute"
Other types will be evaluated in the same matter as PHP would do
{and(false(),false(),true(),false())}
returns false.
{and(true(),true())}
returns true.
Comments