cvs: phpdoc /en/reference/array/functions array-reduce.xml

From: Date: Tue, 06 Sep 2005 07:36:15 +0000
Subject: cvs: phpdoc /en/reference/array/functions array-reduce.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969369909@lists.php.net to get a copy of this message
vrana Tue Sep 6 03:36:15 2005 EDT Modified files: /phpdoc/en/reference/array/functions array-reduce.xml Log: x*10 -> 10*x (bug #34363), empty array without initial returns null http://cvs.php.net/diff.php/phpdoc/en/reference/array/functions/array-reduce.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/array/functions/array-reduce.xml diff -u phpdoc/en/reference/array/functions/array-reduce.xml:1.8 phpdoc/en/reference/array/functions/array-reduce.xml:1.9 --- phpdoc/en/reference/array/functions/array-reduce.xml:1.8 Thu Jan 15 07:42:01 2004 +++ phpdoc/en/reference/array/functions/array-reduce.xml Tue Sep 6 03:36:12 2005 @@ -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 @@ <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>

« previous php.doc (#969369909) next »