public static function toBoolean($str)
    {
        if (!is_string($str)) {
            $str = strval($str);
        }

        $str = strtolower($str);
        return self::STRING_TO_BOOL_MAP[$str] ?? null;
    }
public static function toBoolean($str)
    {
        if (!is_string($str)) {
            $str = strval($str);
        }

        $str = strtolower($str);
        return self::STRING_TO_BOOL_MAP[$str] ?? null;
    }
public static function toBoolean ( $ str ) { if ( ! is_string ( $ str ) ) { $ str = strval ( $ str ) ; } $ str = strtolower ( $ str ) ; return self :: STRING_TO_BOOL_MAP [ $ str ] ?? null ; }
Convert boolean strings to real booleans

@param string|number $str
@return bool|null
Convert boolean strings to real booleans