php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66546 Re-wording required to enable correctly documented text for the function
Submitted: 2014-01-22 16:56 UTC Modified: 2019-04-01 19:22 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: greg at areteweb dot co dot uk 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: greg at areteweb dot co dot uk
New email:
PHP Version: OS:

 

 [2014-01-22 16:56 UTC] greg at areteweb dot co dot uk
Description:
------------
---
From manual page: http://www.php.net/function.in-array
---
In the "Description" section, the document states:
> Searches haystack for needle using loose comparison unless strict is set. 

As the function requires "needle" then "haystack", it would make sense to reword the statement to reflect the function's actual requirements.

e.g. change to:
> Searches with needle in haystack using loose comparison unless strict is set. 

It may seem pedantic, but the wording in the current sentence sincerely confused me and I was having errors with the function until I read examples and found the function required needle then haystack.

This change would also bring continuity to the in_array documentation and match the "Parameters" and "Examples" sections.

Kind Regards,
Greg


Patches

doc-fix-66546 (last revision 2019-01-20 18:00 UTC by girgias@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 16:57 UTC] cmb@php.net
-Type: Feature/Change Request +Type: Documentation Problem -Package: Documentation problem +Package: Arrays related
 [2019-01-11 05:55 UTC] girgias@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: girgias
 [2019-01-20 18:00 UTC] girgias@php.net
The following patch has been added/updated:

Patch Name: doc-fix-66546
Revision:   1548007209
URL:        https://bugs.php.net/patch-display.php?bug=66546&patch=doc-fix-66546&revision=1548007209
 [2019-04-01 19:16 UTC] girgias@php.net
Automatic comment from SVN on behalf of girgias
Revision: http://svn.php.net/viewvc/?view=revision&revision=347118
Log: Fix Doc Bug #66546
 [2019-04-01 19:22 UTC] girgias@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 03:01:29 2024 UTC