Functions:tif

Ternary if operation. This is the equivalent of the ternary operator. It evaluates the first argument and returns the second if it's true, or the third if it's false.

tif(array $rest)


 * rest : you can not use named parameters to call this, use it either with three arguments in the correct order (expression, true result, false result) or write it as in php (expression ? true result : false result)

Example: Output: true foo true foo false false (empty) (empty)