svn: /phpdoc/en/trunk/reference/array/functions/ array-reduce.xml
| From: | Christoph Michael Becker | Date: | Sat, 15 Aug 2015 11:14:12 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/array/functions/ array-reduce.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13586@lists.php.net to get a copy of this message | ||
cmb Sat, 15 Aug 2015 11:14:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337471
Log:
more consistent function name in example (contributed by Jason Woof)
Changed paths:
U phpdoc/en/trunk/reference/array/functions/array-reduce.xml
Modified: phpdoc/en/trunk/reference/array/functions/array-reduce.xml
===================================================================
--- phpdoc/en/trunk/reference/array/functions/array-reduce.xml 2015-08-15 11:08:37 UTC (rev 337470)
+++ phpdoc/en/trunk/reference/array/functions/array-reduce.xml 2015-08-15 11:14:12 UTC (rev 337471)
@@ -122,7 +122,7 @@
return $carry;
}
-function multiplication($carry, $item)
+function product($carry, $item)
{
$carry *= $item;
return $carry;
@@ -132,7 +132,7 @@
$x = array();
var_dump(array_reduce($a, "sum")); // int(15)
-var_dump(array_reduce($a, "multiplication", 10)); // int(1200), because: 10*1*2*3*4*5
+var_dump(array_reduce($a, "product", 10)); // int(1200), because: 10*1*2*3*4*5
var_dump(array_reduce($x, "sum", "No data to reduce")); // string(17) "No
data to reduce"
?>
]]>