Core Function Bool

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Return Value)
m (1 revision)

Revision as of 21:40, 11 August 2014

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 true.

Failure: Returns false.

Remarks

A bool in Sputnik can only be true or false (1 or 0 respectively).

When using == a bool will return true if he bool is true and the other value are 1 or higher example:

($a == true) // true as long as $a is higher than 0
(true == $a) // false unless $a is 1

Example

$newValue = bool( $value );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox