library/Rediska/Config.php
protected function _sanitizeValue($value)
    {
        $value = trim($value);

        // Try to check number
        if (strpos($value, '.') !== false) {
            $number = (integer)$value;
        } else {
            $number = (float)$value;
        }

        if ((string)$number == $value) {
            $value = $number;
        }

        return $value;
    }
protected function _sanitizeValue($value)
    {
        $value = trim($value);

        // Try to check number
        if (strpos($value, '.') !== false) {
            $number = (integer)$value;
        } else {
            $number = (float)$value;
        }

        if ((string)$number == $value) {
            $value = $number;
        }

        return $value;
    }
Sanitize value

@param string $value
@return string|integer|float