php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26255 strrpos gives wrong result
Submitted: 2003-11-14 15:46 UTC Modified: 2003-11-15 13:33 UTC
From: hongnk at hotmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.4 OS: Win2K
Private report: No CVE-ID: None
 [2003-11-14 15:46 UTC] hongnk at hotmail dot com
Description:
------------
Strrpos (count last occurence) give wrong result. Only in 4.3.4 and maybe earlier. 5.00b2 is OK. But strpos (count ocurrence) is correct in all versions.

Running Apache with php4apache.dll module on Win2K.

Reproduce code:
---------------
var_dump(strrpos("Admins;Users;","All Users"));

Expected result:
----------------
boolean false

Actual result:
--------------
int 0;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-15 13:33 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

strrpos searches for a single character, not a string.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 19:01:28 2024 UTC