Bug #81641 [Opn->Nab]: strpos() bug if search string is on first column
| From: | requinix@php.net | Date: | Fri, 19 Nov 2021 16:38:02 +0000 |
| Subject: | Bug #81641 [Opn->Nab]: strpos() bug if search string is on first column | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-237875@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81641&edit=1
ID: 81641
Updated by: requinix@php.net
Reported by: raxe at msn dot com
Summary: strpos() bug if search string is on first column
-Status: Open
+Status: Not a bug
Type: Bug
-Package: *Regular Expressions
+Package: Strings related
Operating System: Windows 10
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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
https://www.php.net/manual/en/function.strpos.php
> Warning
> This function may return Boolean false, but may also return a non-Boolean value
> which evaluates to false. Please read the section on Booleans for more
> information. Use the === operator for testing the return value of this function.
Previous Comments:
------------------------------------------------------------------------
[2021-11-19 16:17:52] raxe at msn dot com
Description:
------------
$full_string = "HELLOW WORD";
$search_string = "HELLOW";
if (strpos($full_string,$search_string)){ //This return false
echo "True";
}else{
echo "False";
}
Expected result:
----------------
True
Actual result:
--------------
False
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81641&edit=1