php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #26539 array_search manual missing info
Submitted: 2003-12-06 06:38 UTC Modified: 2003-12-15 14:13 UTC
From: blakjak at blakjak dot sytes dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.3 OS: Debian Linux
Private report: No CVE-ID: None
 [2003-12-06 06:38 UTC] blakjak at blakjak dot sytes dot net
Description:
------------
The manual page for array_search() does not say how the function behaves when there are multiple instances of the value "needle" in "haystack".  Which of the matching values' keys is returned?

It's most likely that the first matching instance (searching from the beginning of the array) is the one returned, but this should still be explained in the documentation.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-15 14:13 UTC] dave@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of dave
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=5a0a13cb6deaf9e610f1c79870622aa93b717f68
Log: - Add a note about case-sensitivity, fix #26539.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Nov 20 06:00:01 2025 UTC