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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
19 - 6 = ?
Subscribe to this entry?

 
 [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: Mon May 06 16:01:33 2024 UTC