php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61085 Description of strstr
Submitted: 2012-02-14 16:21 UTC Modified: 2012-02-14 18:37 UTC
From: harald at ibfriedrich dot com Assigned: gooh (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: harald at ibfriedrich dot com
New email:
PHP Version: OS:

 

 [2012-02-14 16:21 UTC] harald at ibfriedrich dot com
Description:
------------
---
From manual page: http://www.php.net/function.strstr#refsect1-function.strstr-description
---

The sentence

"Returns part of haystack string from the first occurrence of needle to the end of haystack."

does not mention, that needle is included in the resulting string. The normal reader of the above description expects that the result starts after needle. Better would be:

"Returns part of haystack string from the first _character_ of needle to the end of haystack."

Best regards, Harald Friedrich



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-14 18:19 UTC] gooh@php.net
Automatic comment from SVN on behalf of gooh
Revision: http://svn.php.net/viewvc/?view=revision&revision=323216
Log: clarified that the function will return the haystack including the needle, fixes #61085
 [2012-02-14 18:35 UTC] gooh@php.net
Automatic comment from SVN on behalf of gooh
Revision: http://svn.php.net/viewvc/?view=revision&revision=323218
Log: clarified that the function will return the haystack including the needle, related to #61085
 [2012-02-14 18:37 UTC] gooh@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: gooh
 [2012-02-14 18:37 UTC] gooh@php.net
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 05:00:01 2026 UTC