Skip to content

Commit

Permalink
Fix #81299: password_hash() documentation is missing PHP 8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed Jul 26, 2021
1 parent 3678d8e commit 79c06cc
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions reference/password/functions/password-hash.xml
Expand Up @@ -10,10 +10,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>password_hash</methodname>
<type>string</type><methodname>password_hash</methodname>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam><type>mixed</type><parameter>algo</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam><type class="union"><type>string</type><type>int</type><type>null</type></type><parameter>algo</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
</methodsynopsis>
<para>
<function>password_hash</function> creates a new password hash using a strong one-way hashing
Expand Down Expand Up @@ -72,8 +72,9 @@
</para>
<warning>
<para>
The salt option has been deprecated as of PHP 7.0.0. It is now
The salt option is deprecated. It is now
preferred to simply use the salt that is generated by default.
As of PHP 8.0.0, an explicitly given salt is ignored.
</para>
</warning>
</listitem>
Expand Down Expand Up @@ -114,7 +115,7 @@
</para>
<warning>
<para>
Only available when PHP use libargon2, not with libsodium implementation.
Only available when PHP uses libargon2, not with libsodium implementation.
</para>
</warning>
</listitem>
Expand Down Expand Up @@ -167,7 +168,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the hashed password, &return.falseforfailure;.
Returns the hashed password.
</para>
<para>
The used algorithm, cost and salt are returned as part of the hash. Therefore,
Expand All @@ -189,6 +190,18 @@
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<function>password_hash</function> no longer returns &false; on failure.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
The <parameter>algo</parameter> parameter is nullable now.
</entry>
</row>
<row>
<entry>7.4.0</entry>
<entry>
Expand Down

0 comments on commit 79c06cc

Please sign in to comment.