From: lwx0108 at gmail dot com Operating system: ubuntu PHP version: 5.2.6 PHP Bug Type: Output Control Bug description:
Description: ------------ when i conert langer than 2147483647(0x6fffffff) use decbin will return 32's 1 Reproduce code: --------------- <?php $shmKey = ftok(__FILE__, 'c'); $pid = posix_getpid(); if ($shmKey) { >---$shmId = shmop_open($shmKey, 'c', 0775, 32); >---$w = shmop_write($shmId, 0x7fffffff, 0); >---$r = shmop_read($shmId, 0, 32); >---$d = shmop_delete($shmId); >---echo $r . "\n"; >---echo decbin($r); } ?> -- Edit bug report at http://bugs.php.net/?id=45499&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45499&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45499&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45499&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45499&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45499&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45499&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45499&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45499&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45499&r=support Expected behavior: http://bugs.php.net/fix.php?id=45499&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45499&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45499&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45499&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45499&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45499&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45499&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45499&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45499&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45499&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45499&r=mysqlcfg