mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Fixed Bug #5246: round() has a second optional argument
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27239 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
34a2c88941
commit
7c10f40d3e
1 changed files with 10 additions and 4 deletions
|
@ -968,17 +968,23 @@ $randval = mt_rand();
|
|||
<funcprototype>
|
||||
<funcdef>double <function>round</function></funcdef>
|
||||
<paramdef>double <parameter>val</parameter></paramdef>
|
||||
<paramdef>
|
||||
<parameter><optional>int precision</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
|
||||
<para>
|
||||
Returns the rounded value of <parameter>val</parameter>.
|
||||
Returns the rounded value of <parameter>val</parameter> to
|
||||
specified precision.
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
$foo = round( 3.4 ); // $foo == 3.0
|
||||
$foo = round( 3.5 ); // $foo == 4.0
|
||||
$foo = round( 3.6 ); // $foo == 4.0
|
||||
$foo = round( 3.4 ); // $foo == 3.0
|
||||
$foo = round( 3.5 ); // $foo == 4.0
|
||||
$foo = round( 3.6 ); // $foo == 4.0
|
||||
|
||||
$foo = round( 1.95583 , 2 ); // $foo == 1.96
|
||||
</programlisting>
|
||||
</informalexample></para>
|
||||
|
||||
|
|
Loading…
Reference in a new issue