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: Out of "char"(8-bit) range value doesn't roll back, with uni-code ON.
Description: ------------ The character(8-bit) range of value does not roll back to the corresponding minimum value, once the value reaches beyond the range of a char(8-bit) that it can hold, when Unicode is ON. Reproduce code: --------------- --TEST-- --FILE-- <?php var_dump( decbin( ord(chr(255)) ) ); var_dump( decbin( ord(chr(256)) ) ); var_dump( decbin( ord(chr(257)) ) ); ?> --EXPECTF-- Expected result: ---------------- unicode(8) "11111111" unicode(1) "0" unicode(1) "1" Actual result: -------------- unicode(8) "11111111" unicode(9) "100000000" unicode(9) "100000001" -- Edit bug report at http://bugs.php.net/?id=42528&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42528&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42528&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42528&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42528&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42528&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42528&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42528&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42528&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42528&r=support Expected behavior: http://bugs.php.net/fix.php?id=42528&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42528&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42528&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42528&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42528&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42528&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42528&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42528&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42528&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42528&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42528&r=mysqlcfg