Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4: Document type widening of mode param of round() #4107

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reference/math/functions/max.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value_array</parameter></term>
<term><parameter>value</parameter></term>
<listitem>
<para>
An array containing the values.
Expand Down
2 changes: 1 addition & 1 deletion reference/math/functions/min.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value_array</parameter></term>
<term><parameter>value</parameter></term>
<listitem>
<para>
An array containing the values.
Expand Down
10 changes: 9 additions & 1 deletion reference/math/functions/round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<type>float</type><methodname>round</methodname>
<methodparam><type class="union"><type>int</type><type>float</type></type><parameter>num</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>precision</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PHP_ROUND_HALF_UP</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>RoundingMode</type></type><parameter>mode</parameter><initializer><constant>RoundingMode::HalfAwayFromZero</constant></initializer></methodparam>
</methodsynopsis>
<para>
Returns the rounded value of <parameter>num</parameter> to
Expand Down Expand Up @@ -136,6 +136,14 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<parameter>mode</parameter> now accepts values from the
<enumname>RoundingMode</enumname> enum.
The default value is now <enumidentifier>RoundingMode::HalfAwayFromZero</enumidentifier>.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
Expand Down