src/HSPHP/ReadSocket.php
protected function encodeString($string)
    {
        if (is_null($string)) {
            return self::NULL;
        } else {
            return strtr($string, self::$encodeMap);
        }
    }
protected function encodeString($string)
    {
        if (is_null($string)) {
            return self::NULL;
        } else {
            return strtr($string, self::$encodeMap);
        }
    }
Encode string for sending to server

@param string $string

@return string