bool
This function converts a value to a voolean value.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
valid types | Value Strings returning true:true, yes, '1' (not case sensitive, and also in other supported languages) |
Type | Description |
---|---|
boolean | Result Identified boolean value |
echo( bool(TRUE), " ", bool(Falsch) ); // true, false
echo( bool("Ja"), " ", bool("No") ); // true, false
echo( bool("1"), " ", bool(0) ); // true, false
echo( bool({{}}), " ", bool({}) ); // true, false
echo( bool( date( '10:30:00' )), " ", bool( date("") ) ); // true, fasle
true false
true false
true false
true false
true false