php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65262 Return type should be mixed
Submitted: 2013-07-15 07:43 UTC Modified: 2013-08-19 05:44 UTC
From: michael at zedeler dot dk Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.5.0 OS: N/A
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: michael at zedeler dot dk
New email:
PHP Version: OS:

 

 [2013-07-15 07:43 UTC] michael at zedeler dot dk
Description:
------------
---
From manual page: http://www.php.net/function.strpos#refsect1-function.strpos-description
---
The signature is written as:

int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )

This is wrong since strpos can return FALSE, so the signature should be:

mixed strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )

(Which I find silly, but alas, that is the way things are(tm).)


Test script:
---------------
N/A


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-19 05:43 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=331154
Log: incorrect function signature #65262
 [2013-08-19 05:44 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-08-19 05:44 UTC] krakjoe@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 22:00:01 2026 UTC