ez.no / exponential / documentation / reference / template operators / logic / or
or( value [,...] )
| Name | Type | Description | Required |
|---|---|---|---|
| value | mixed | To be evaluated. | Yes. |
| ... |
Boolean.
Evaluates all parameter values until one is found to be true, then returns that value. The remaining parameters are not evaluated at all. If there are no parameters or all elements were false, the operator returns 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
{or( false(), false(), true(), false() )}
returns true.
Comments