src/Koldy/Util.php
public static function str2hex(string $x): string
    {
        $string = '';

        foreach (str_split($x) as $char) {
            $string .= sprintf('%02X', ord($char));
        }

        return $string;
    }
public static function str2hex(string $x): string
    {
        $string = '';

        foreach (str_split($x) as $char) {
            $string .= sprintf('%02X', ord($char));
        }

        return $string;
    }
public static function str2hex ( string $ x ) : string { $ string = '' ; foreach ( str_split ( $ x ) as $ char ) { $ string .= sprintf ( '%02X' , ord ( $ char ) ) ; } return $ string ; }
Get the hex representation of string

@param string $x

@return string
Get the hex representation of string