mirror of
https://github.com/php/doc-zh.git
synced 2026-03-24 15:12:20 +01:00
* Update vprintf.xml * Update bin2hex.xml * Update stristr.xml * Update quoted-printable-decode.xml * Update nl2br.xml * Update setlocale.xml * Update setlocale.xml * Update setlocale.xml * Update count-chars.xml * Update get-html-translation-table.xml * Update get-html-translation-table.xml * Update bin2hex.xml * Update get-html-translation-table.xml * Update quoted-printable-decode.xml * Update setlocale.xml
104 lines
2.3 KiB
XML
104 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 6330e4d73192c49a6867c6bbc3cbf09d63a1e36a Maintainer: nio Status: ready -->
|
|
<!-- CREDITS: mowangjuanzi -->
|
|
<refentry xml:id="function.bin2hex" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>bin2hex</refname>
|
|
<refpurpose>将二进制数据转换为十六进制表示</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>bin2hex</methodname>
|
|
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
返回 ASCII 字符串,包含 <parameter>string</parameter>
|
|
的十六进制表示。转换是高位优先,按字节完成的。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>string</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
字符串。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
返回指定字符串的十六进制表示。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>bin2hex</function> 示例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$hex = bin2hex('Hello world!');
|
|
|
|
var_dump($hex);
|
|
var_dump(hex2bin($hex));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
string(24) "48656c6c6f20776f726c6421"
|
|
string(12) "Hello world!"
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>hex2bin</function></member>
|
|
<member><function>pack</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|