public function encode($data, $leaveEOD = false)
    {
        $t = \unpack('H*', $data);
        return \current($t)
            . ($leaveEOD ? '' : '>');
    }
public function encode($data, $leaveEOD = false)
    {
        $t = \unpack('H*', $data);
        return \current($t)
            . ($leaveEOD ? '' : '>');
    }
public function encode ( $ data , $ leaveEOD = false ) { $ t = \ unpack ( 'H*' , $ data ) ; return \ current ( $ t ) . ( $ leaveEOD ? '' : '>' ) ; }
Converts a string into ASCII hexadecimal representation.

@param string $data The input string
@param boolean $leaveEOD
@return string
Converts a string into ASCII hexadecimal representation .