Doc #66480 [Com]: Ambiguous Language For array_diff() Documentation
| From: | narf at devilix dot net | Date: | Thu, 06 Mar 2014 17:51:31 +0000 |
| Subject: | Doc #66480 [Com]: Ambiguous Language For array_diff() Documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11050@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66480&edit=1
ID: 66480
Comment by: narf at devilix dot net
Reported by: mpearson at mpearson dot net
Summary: Ambiguous Language For array_diff() Documentation
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This has already been fixed.
Previous Comments:
------------------------------------------------------------------------
[2014-01-15 08:58:56] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=332625
Log: Clarify the introductory array_diff() paragraph.
Fixes doc bug #66480 (Ambiguous Language For array_diff() Documentation).
------------------------------------------------------------------------
[2014-01-13 20:32:19] mpearson at mpearson dot net
Description:
------------
The documentation for array_diff() is a bit ambiguous in the "Description" section.
Quote: "Compares array1 against array2 and returns the difference."
While the statement is technically true, it is not until the "Return Values" section that
the documentation clarifies that excess values in 'array2' will not be returned as well.
At a quick glance, if the description matches desired action the "Return Values" section
may never be viewed to clarify the ambiguity from the description.
My recommendation would be to change the description to something like, " Compares array1
against array2 and returns the values from array1 which are not found in array2."
This makes it immediately clear that the values returned will not include non-matching values found
in array2. Granted, the confusion could be blamed on the developer for not reviewing the entire
documentation, but I am certain I am not the only person that will use a function based on the
description matching the desired affect not expecting the description to be ambiguous.
Thanks!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66480&edit=1