#43693 [Opn->Csd]: array_fill_keys() value parameter, misleading array suggestion
| From: | mattwil@php.net | Date: | Sun, 11 May 2008 14:12:26 +0000 |
| Subject: | #43693 [Opn->Csd]: array_fill_keys() value parameter, misleading array suggestion | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-816@lists.php.net to get a copy of this message | ||
ID: 43693
Updated by: mattwil@php.net
Reported By: stein at visibone dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Changed to "Value to use for filling" to match array_fill()'s value
description.
Previous Comments:
------------------------------------------------------------------------
[2007-12-27 21:11:39] stein at visibone dot com
Description:
------------
Description of the "value" parameter is misleading:
Either an string or an array of values
implying (or badly open to misinterpretation) that the "values" would
be applied to the output array, one "value" per element, as is
array_combine(). The truth is an array for the 2nd parameter would be
used as any other type would be: cloned for every value in the output
array. That should be explicit, e.g.:
Assigned to each and every element of the output array
Reproduce code:
---------------
array(1=>array(11,22), 2=>array(11,22))
==
array_fill_keys(array(1,2), array(11,22))
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43693&edit=1