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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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)

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC