php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #70655 misleading function summary
Submitted: 2015-10-07 02:46 UTC Modified: 2019-04-01 19:21 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: lucas at threeam dot com dot au Assigned: girgias (profile)
Status: Closed Package: Arrays related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lucas at threeam dot com dot au
New email:
PHP Version: OS:

 

 [2015-10-07 02:46 UTC] lucas at threeam dot com dot au
Description:
------------
---
From manual page: http://www.php.net/function.array-map
---

says, incorrectly "The number of parameters that the callback function accepts should match the number of arrays passed to the array_map()"

but should be "The number of parameters that the callback function accepts should be one fewer than the number of arrays passed to array_map()"
or something that differentiates the first array from additional array arguments.


Patches

doc-fix-70655 (last revision 2019-01-20 17:56 UTC by girgias@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 17:25 UTC] cmb@php.net
-Package: Documentation problem +Package: Arrays related
 [2019-01-11 05:53 UTC] girgias@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: girgias
 [2019-01-20 17:56 UTC] girgias@php.net
The following patch has been added/updated:

Patch Name: doc-fix-70655
Revision:   1548006976
URL:        https://bugs.php.net/patch-display.php?bug=70655&patch=doc-fix-70655&revision=1548006976
 [2019-02-12 16:27 UTC] cmb@php.net
@girgias Your patch doesn't like quite right, since array_map()
expects at least two parameters, so $... is not optional.  Even if
the choice="opt" would be removed, the $... would still be easily
misleading, since a variadic parameter (...$params) still could be
omitted.
 [2019-02-12 16:29 UTC] girgias@php.net
@cmb Yes I've realised but didn't go back to it.
Will try to do fix it this evening.
 [2019-02-12 21:10 UTC] girgias@php.net
Updated my patch at:
http://edit.php.net/?patchID=3265&project=PHP

Can you have a look @cmb?
 [2019-04-01 19:15 UTC] girgias@php.net
Automatic comment from SVN on behalf of girgias
Revision: http://svn.php.net/viewvc/?view=revision&revision=347117
Log: Fix Doc Bug #70655
 [2019-04-01 19:21 UTC] girgias@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 13:00:02 2026 UTC