reference/strings/functions/crc32.xml
e095023e408c8cb6378ae16bb6870343a3946919
...
...
@@ -10,11 +10,11 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>crc32</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
Generates the cyclic redundancy checksum polynomial of 32-bit
17
-
lengths of the <parameter>str</parameter>. This is usually used
17
+
lengths of the <parameter>string</parameter>. This is usually used
18
18
to validate the integrity of data being transmitted.
19
19
</para>
20
20
<warning>
...
...
@@ -52,7 +52,7 @@
52
52
<simpara>
53
53
For a more portable solution you may also consider the generic
54
54
<function>hash</function>. <code>hash("crc32b", $str)</code> will
55
-
return the same string as <code>dechex(crc32($str))</code>.
55
+
return the same string as <code>str_pad(dechex(crc32($str)), 8, '0', STR_PAD_LEFT)</code>.
56
56
</simpara>
57
57
</warning>
58
58
</refsect1>
...
...
@@ -62,7 +62,7 @@
62
62
<para>
63
63
<variablelist>
64
64
<varlistentry>
65
-
<term><parameter>str</parameter></term>
65
+
<term><parameter>string</parameter></term>
66
66
<listitem>
67
67
<para>
68
68
The data.
...
...
@@ -76,7 +76,7 @@
76
76
<refsect1 role="returnvalues">
77
77
&reftitle.returnvalues;
78
78
<para>
79
-
Returns the crc32 checksum of <parameter>str</parameter> as an integer.
79
+
Returns the crc32 checksum of <parameter>string</parameter> as an integer.
80
80
</para>
81
81
</refsect1>
82
82

...
...
@@ -113,7 +113,6 @@ printf("%u\n", $checksum);
113
113
</refsect1>
114
114

115
115
</refentry>
116
-

117
116
<!-- Keep this comment at the end of the file
118
117
Local variables:
119
118
mode: sgml
120
119