[doc-en] master: Properly document hash(), hash_init(), hash_file() options array (#6099)
| From: | Andrey Andreev via GitHub | Date: | Tue, 17 Nov 2026 13:20:41 +0000 |
| Subject: | [doc-en] master: Properly document hash(), hash_init(), hash_file() options array (#6099) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23969@lists.php.net to get a copy of this message | ||
Author: Andrey Andreev (narfbg)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-11-17T14:20:38+01:00
Commit: https://github.com/php/doc-en/commit/443cb58251a58190e0bf8e337ec469e68e35254a
Raw diff: https://github.com/php/doc-en/commit/443cb58251a58190e0bf8e337ec469e68e35254a.diff
Properly document hash(), hash_init(), hash_file() options array (#6099)
* Properly document hash(), hash_init(), hash_file() options array
* Specify which XXHash variants support 'secret'
Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
---------
Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
Changed paths:
M reference/hash/functions/hash-file.xml
M reference/hash/functions/hash-init.xml
M reference/hash/functions/hash.xml
Diff:
diff --git a/reference/hash/functions/hash-file.xml b/reference/hash/functions/hash-file.xml
index ab90e3fbabb7..5b1306a3a889 100644
--- a/reference/hash/functions/hash-file.xml
+++ b/reference/hash/functions/hash-file.xml
@@ -51,9 +51,17 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
- An array of options for the various hashing algorithms.
- Currently, only the <literal>"seed"</literal> parameter is
- supported by the MurmurHash variants.
+ An array of options for the various hashing algorithms:
+ <variablelist>
+ <varlistentry>
+ <term><literal>'seed'</literal>
(<type>int</type>)</term>
+ <listitem><simpara>Supported by MurmurHash3 and XXHash
variants.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>'secret'</literal>
(<type>string</type>)</term>
+ <listitem><simpara>Supported by <literal>xxh3</literal> and
<literal>xxh128</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
</para>
</listitem>
</varlistentry>
diff --git a/reference/hash/functions/hash-init.xml b/reference/hash/functions/hash-init.xml
index c1f5ed300267..4fdbb4c2740f 100644
--- a/reference/hash/functions/hash-init.xml
+++ b/reference/hash/functions/hash-init.xml
@@ -60,9 +60,17 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
- An array of options for the various hashing algorithms.
- Currently, only the <literal>"seed"</literal> parameter is
- supported by the MurmurHash variants.
+ An array of options for the various hashing algorithms:
+ <variablelist>
+ <varlistentry>
+ <term><literal>'seed'</literal>
(<type>int</type>)</term>
+ <listitem><simpara>Supported by MurmurHash3 and XXHash
variants.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>'secret'</literal>
(<type>string</type>)</term>
+ <listitem><simpara>Supported by <literal>xxh3</literal> and
<literal>xxh128</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
</para>
</listitem>
</varlistentry>
diff --git a/reference/hash/functions/hash.xml b/reference/hash/functions/hash.xml
index bb8e5f48e939..ad13a06ad305 100644
--- a/reference/hash/functions/hash.xml
+++ b/reference/hash/functions/hash.xml
@@ -50,9 +50,17 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
- An array of options for the various hashing algorithms.
- Currently, only the <literal>"seed"</literal> parameter is
- supported by the MurmurHash variants.
+ An array of options for the various hashing algorithms:
+ <variablelist>
+ <varlistentry>
+ <term><literal>'seed'</literal>
(<type>int</type>)</term>
+ <listitem><simpara>Supported by MurmurHash3 and XXHash
variants.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>'secret'</literal>
(<type>string</type>)</term>
+ <listitem><simpara>Supported by <literal>xxh3</literal> and
<literal>xxh128</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
</para>
</listitem>
</varlistentry>