private static function convertBytesToEntities(array $m)
    {
        $m = $m[1];
        $out = "";
        for($i=0; $i < strlen($m); $i++)
        {
            $out .= '&#X'.strtoupper(dechex(ord($m[$i]))).';';
        }
        return $out;
    }
private static function convertBytesToEntities(array $m)
    {
        $m = $m[1];
        $out = "";
        for($i=0; $i < strlen($m); $i++)
        {
            $out .= '&#X'.strtoupper(dechex(ord($m[$i]))).';';
        }
        return $out;
    }
private static function convertBytesToEntities ( array $ m ) { $ m = $ m [ 1 ] ; $ out = "" ; for ( $ i = 0 ; $ i < strlen ( $ m ) ; $ i ++ ) { $ out .= '&#X' . strtoupper ( dechex ( ord ( $ m [ $ i ] ) ) ) . ';' ; } return $ out ; }
preg callback
Changes all bytes to hexadecimal XML entities

@param array $m first array element is used for input

@return string
preg callback Changes all bytes to hexadecimal XML entities