From:             mahesh dot vemula at in dot ibm dot com
Operating system: RHEL4
PHP version:      6CVS-2007-09-03 (CVS)
PHP Bug Type:     Performance problem
Bug description:  strncmp() output differs with and without Unicode

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 bug report at http://bugs.php.net/?id=42532&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42532&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42532&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42532&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42532&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42532&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42532&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42532&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42532&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42532&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42532&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42532&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42532&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42532&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42532&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42532&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42532&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42532&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42532&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42532&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42532&r=mysqlcfg
  • #42532 [NEW]: strncmp() output dif... mahesh dot vemula at in dot ibm dot com

Reply via email to