src/Bool.php
public static function extIs($value)
    {
        if (static::is($value)) {
            return true;
        }

        if (is_string($value)) {
            // This function should be case insensitive so let's compare to the lower-cased input string.
            $value = strtolower($value);
            return (static::isTrueStrExt($value) || static::isFalseStrExt($value));
        }

        return false;
    }
public static function extIs($value)
    {
        if (static::is($value)) {
            return true;
        }

        if (is_string($value)) {
            // This function should be case insensitive so let's compare to the lower-cased input string.
            $value = strtolower($value);
            return (static::isTrueStrExt($value) || static::isFalseStrExt($value));
        }

        return false;
    }
public static function extIs ( $ value ) { if ( static :: is ( $ value ) ) { return true ; } if ( is_string ( $ value ) ) { // This function should be case insensitive so let's compare to the lower-cased input string. $ value = strtolower ( $ value ) ; return ( static :: isTrueStrExt ( $ value ) || static :: isFalseStrExt ( $ value ) ) ; } return false ; }
Tests if the given value is a bool or not.

This function considers also the strings 'true', 'false', 'on', 'off', 'yes', 'no', 'y', 'n', '1', '0'
to be booleans. The function is NOT case sensitive.

@param mixed $value The value to test.

@return bool Returns true if the value is a bool or 0 or 1, false otherwise.
Tests if the given value is a bool or not .