#36494 [Opn->Bgs]: var_dump(strpos("1234",1234)); //returns false
| From: | tony2001@php.net | Date: | Thu, 23 Feb 2006 12:26:12 +0000 |
| Subject: | #36494 [Opn->Bgs]: var_dump(strpos("1234",1234)); //returns false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93565@lists.php.net to get a copy of this message | ||
ID: 36494
Updated by: tony2001@php.net
Reported By: ninive at gmx dot at
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Windows XPSP2
PHP Version: 4.4.2
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
http://php.net/strpos
"If needle is not a string, it is converted to an integer and applied
as the ordinal value of a character."
Previous Comments:
------------------------------------------------------------------------
[2006-02-23 07:27:48] ninive at gmx dot at
Description:
------------
strpos() returns false, if second argument is a number.
Reproduce code:
---------------
var_dump(strpos("1234",1234)); // -> returns false
Expected result:
----------------
0
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36494&edit=1