php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #38209 return value of ereg, strpor, etc. is mixed, not int
Submitted: 2006-07-25 17:42 UTC Modified: 2006-07-25 19:50 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: thuejk at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: Irrelevant OS: all
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: thuejk at gmail dot com
New email:
PHP Version: OS:

 

 [2006-07-25 17:42 UTC] thuejk at gmail dot com
Description:
------------
The prototype for strpos() at http://dk2.php.net/manual/en/function.strpos.php is

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

however, as it says below 

  If needle is not found, strpos() will return boolean FALSE.

So the return value should be "mixed". Same for the functions mentioned in "see also" for strpos() and ereg().


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-25 19:50 UTC] nlopess@php.net
We have already discussed this one, and although I agree with you, we voted for not changing it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 04:01:30 2024 UTC