Functions::isTrue($value)

Version 4

Check if value considered to be true

Value is considered to be true, it is: - bool TRUE - int != 0 - decimal != 0 - string != '' and != 'false'

Return value

Bool

Arguments

$value mixed
Value to check

Full documentation

Note:

Check var is true:

$var = 'false';
if ( isTrue($var) ){
    // is not true, because string 'false' is considered to be not true
}