Core Function Bool
From Sputnik Wiki
Bool( <expression> )
Contents |
Description
Returns the TRUE(1) or FALSE(0) representation of an expression
Parameters
Expression
An expression to convert.
Return Value
Success: Returns 1.
Failure: Returns 0.
Remarks
Sputnik doesn't have a BOOL type so it converts the expression to an Int64 then checks if its higher than zero then returns 1 or 0 depending on the result.
Example
$newValue = bool( $value );