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
 [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: Thu May 02 04:01:30 2024 UTC