#42532 [Opn->Bgs]: strncmp() output differs with and without Unicode
| From: | mahesh dot vemula at in dot ibm dot com | Date: | Fri, 07 Sep 2007 13:19:36 +0000 |
| Subject: | #42532 [Opn->Bgs]: strncmp() output differs with and without Unicode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117277@lists.php.net to get a copy of this message | ||
ID: 42532
User updated by: mahesh dot vemula at in dot ibm dot com
Reported By: mahesh dot vemula at in dot ibm dot com
-Status: Open
+Status: Bogus
Bug Type: Performance problem
Operating System: RHEL4
PHP Version: 6CVS-2007-09-03 (CVS)
New Comment:
The output is valid and expected.
Previous Comments:
------------------------------------------------------------------------
[2007-09-03 13:24:56] mahesh dot vemula at in dot ibm dot com
Description:
------------
strncmp() of a regular string(as first argument) with an empty string,
returns an integer value of difference in their length when Unicode is
OFF, and returns int(+1) when the Unicode is ON.
Is this the expected behavior according to documentation, which says
strncmp() returns >0 or <0 when two strings are not equal. Or Could
output be consistent with and without Unicode?
Reproduce code:
---------------
--TEST--
--FILE--
<?php
var_dump( strncmp("Hello", "", 10) );
?>
--EXPECTF--
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42532&edit=1