From: ptown at s57 dot xrea dot com Operating system: Windows98 PHP version: 5.0.0RC1 PHP Bug Type: Unknown/Other Function Bug description: php_manual_ja.chm -> strncasecmp()
Description: ------------ I do not know English. Solly. Japanese: PHP Version 5.0.0b2 でバグらしきものを見つけたので報告します。 PHP マニュアルのstrncasecmp関数に書いてある内容と 実際の動作結果が異なりました。 マニュアルには どちらかの文字列が lenより短い場合、その文字列の長さが比較時に使用されます。 と書いてあります。 $var1 = "abc"; $var2 = "aBcd"; $i = strncasecmp($var1, $var2, 4); この場合、マニュアルを読んで $var1 = "abc"; $var2 = "aBcd"; $i = strncasecmp($var1, $var2, 3); と同等だ解釈しましたが、動作結果は4バイトの比較がなされ、 $iに負の値が入りました。 Bug #8195に書かれていることとほぼ同じです。 マニュアルが違っているか、PHPの動作が間違っているかを 早く知りたいです。 Reproduce code: --------------- I do not know English. Solly. Expected result: ---------------- I do not know English. Solly. Actual result: -------------- I do not know English. Solly. -- Edit bug report at http://bugs.php.net/?id=27870&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27870&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27870&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27870&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27870&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27870&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27870&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27870&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27870&r=support Expected behavior: http://bugs.php.net/fix.php?id=27870&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27870&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27870&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27870&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27870&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27870&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27870&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27870&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27870&r=float