mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
x*10 -> 10*x (bug #34363), empty array without initial returns null
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@195243 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b2ae82a10d
commit
c733d77580
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.array-reduce">
|
||||
<refnamediv>
|
||||
|
@ -24,6 +24,8 @@
|
|||
a single value. If the optional <parameter>initial</parameter> is
|
||||
available, it will be used at the beginning of the process, or as
|
||||
a final result in case the array is empty.
|
||||
If the array is empty and <parameter>initial</parameter> is not passed,
|
||||
<function>array_reduce</function> returns &null;.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
|
@ -56,7 +58,7 @@ $d = array_reduce($x, "rsum", 1);
|
|||
<para>
|
||||
This will result in <varname>$b</varname> containing
|
||||
<literal>15</literal>, <varname>$c</varname> containing
|
||||
<literal>1200</literal> (= 1*2*3*4*5*10), and
|
||||
<literal>1200</literal> (= 10*1*2*3*4*5), and
|
||||
<varname>$d</varname> containing <literal>1</literal>.
|
||||
</para>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue