reference/strings/functions/bin2hex.xml
6330e4d73192c49a6867c6bbc3cbf09d63a1e36a
...
...
@@ -10,11 +10,11 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>bin2hex</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
Returns an ASCII string containing the hexadecimal representation
17
-
of <parameter>str</parameter>. The conversion is done byte-wise
17
+
of <parameter>string</parameter>. The conversion is done byte-wise
18
18
with the high-nibble first.
19
19
</para>
20
20
</refsect1>
...
...
@@ -24,10 +24,10 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>str</parameter></term>
27
+
<term><parameter>string</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
A character.
30
+
A string.
31
31
</para>
32
32
</listitem>
33
33
</varlistentry>
...
...
@@ -42,18 +42,44 @@
42
42
</para>
43
43
</refsect1>
44
44

45
+
<refsect1 role="examples">
46
+
&reftitle.examples;
47
+
<para>
48
+
<example>
49
+
<title><function>bin2hex</function> example</title>
50
+
<programlisting role="php">
51
+
<![CDATA[
52
+
<?php
53
+

54
+
$hex = bin2hex('Hello world!');
55
+

56
+
var_dump($hex);
57
+
var_dump(hex2bin($hex));
58
+
?>
59
+
]]>
60
+
</programlisting>
61
+
&example.outputs;
62
+
<screen>
63
+
<![CDATA[
64
+
string(24) "48656c6c6f20776f726c6421"
65
+
string(12) "Hello world!"
66
+
]]>
67
+
</screen>
68
+
</example>
69
+
</para>
70
+
</refsect1>
71
+
45
72
<refsect1 role="seealso">
46
73
&reftitle.seealso;
47
74
<para>
48
75
<simplelist>
76
+
<member><function>hex2bin</function></member>
49
77
<member><function>pack</function></member>
50
-
<member><function>unpack</function></member>
51
78
</simplelist>
52
79
</para>
53
80
</refsect1>
54
81

55
82
</refentry>
56
-

57
83
<!-- Keep this comment at the end of the file
58
84
Local variables:
59
85
mode: sgml
60
86