|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42206 Bug from function strrpos
Submitted: 2007-08-04 09:55 UTC Modified: 2007-08-04 12:18 UTC
From: haict at runsystem dot net Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.4.7 OS: Widows Server 2003
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.
Block user comment
Status: Assign to:
Bug Type:
From: haict at runsystem dot net
New email:
PHP Version: OS:


 [2007-08-04 09:55 UTC] haict at runsystem dot net
I got a false result when i run bellow script:

I tested that script on Windows Server 2003 and Redhad Enterprice Linux 4 with versions: 4.3.11, 4.4.2 and 4.4.7

Reproduce code:
	$order_pos = strrpos($str, "ORDER");
	echo $order_pos ;

Expected result:
if true $order_pos === false;

Actual result:
I got a string in my screen which is 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-04 12:18 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

In PHP 4 the needle can only be a single character so you end up searching for O which is as position 3.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 20:01:28 2024 UTC