php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #43523 strrchr description inaccurate
Submitted: 2007-12-06 19:59 UTC Modified: 2008-01-07 19:59 UTC
From: php at htmlland dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at htmlland dot net
New email:
PHP Version: OS:

 

 [2007-12-06 19:59 UTC] php at htmlland dot net
Description:
------------
THe description is currently "string strrchr(string $haystack,string $needle)". The needle should be of mixed type as later in the documentation it says:

If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.

Plus the example even shows this!:
// get everything after last newline
$text = "Line 1\nLine 2\nLine 3";
$last = substr(strrchr($text, 10), 1 );

Thanks, Mike


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-06 20:02 UTC] php at htmlland dot net
The same applies for strstr and stristr.

Thanks, Mike
 [2008-01-07 19:59 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 21:00:02 2026 UTC