Doc #70654 [Opn->Csd]: array_map key preservation behaviour not explicit
| From: | cmb@php.net | Date: | Wed, 29 Jun 2016 17:50:22 +0000 |
| Subject: | Doc #70654 [Opn->Csd]: array_map key preservation behaviour not explicit | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13655@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70654&edit=1
ID: 70654
Updated by: cmb@php.net
Reported by: lucas at threeam dot com dot au
Summary: array_map key preservation behaviour not explicit
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
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.
Previous Comments:
------------------------------------------------------------------------
[2016-06-29 17:49:55] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=339528
Log: Fix #70654: array_map key preservation behaviour not explicit
------------------------------------------------------------------------
[2015-10-07 02:29:27] lucas at threeam dot com dot au
Description:
------------
---
From manual page: http://www.php.net/function.array-map
---
Not a dupe of, but related to #43612.
The page says (too far down) that "If the array argument contains string keys then the returned
array will contain string keys if and only if exactly one array is passed. If more than one argument
is passed then the returned array always has integer keys."
Whereas the actual behaviour is "The returned array will preserve the keys of the array
argument if and only if exactly one array is passed. If more than one array is passed, the returned
array will have sequential, integer keys."
It would be great if this was official so we could rely on it.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70654&edit=1