php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1096 strpos function
Submitted: 1999-01-26 10:05 UTC Modified: 1999-01-26 11:37 UTC
From: A dot Bednarz at gmx dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.6 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 !
Your email address:
MUST BE VALID
Solve the problem:
38 - 9 = ?
Subscribe to this entry?

 
 [1999-01-26 10:05 UTC] A dot Bednarz at gmx dot de
The strpos function returns 0 if needle is not found in haystack AND
 it returns 0 if needle starts at position 0 in string haystack.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-01-26 11:37 UTC] rasmus
Incorrect.  It returns "" when the needle is not found and 0 when it is found in the first position.  You just have to write your condition appropriately.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 03:01:32 2024 UTC