#38770 [NEW]: pack/unpack is broken on 64bit

From: Date: Sun, 10 Sep 2006 15:55:20 +0000
Subject: #38770 [NEW]: pack/unpack is broken on 64bit
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101962@lists.php.net to get a copy of this message
From: fwmatt at dsl dot pipex dot com Operating system: Linux x86_64 PHP version: 5.1.6 PHP Bug Type: Unknown/Other Function Bug description: pack/unpack is broken on 64bit Description: ------------ On my 32bit x86 system the attached code produces the expected results, however on my x86 64bit system it produces the (actual) attached. Reproduce code: --------------- print_r( unpack( "N", pack( 'N', -30000 ) )); Expected result: ---------------- Array ( [1] => -30000 ) Actual result: -------------- Array ( [1] => 4294937296 ) -- Edit bug report at http://bugs.php.net/?id=38770&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38770&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38770&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38770&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38770&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38770&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38770&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38770&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38770&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38770&r=support Expected behavior: http://bugs.php.net/fix.php?id=38770&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38770&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38770&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38770&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38770&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38770&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38770&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38770&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38770&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38770&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38770&r=mysqlcfg

« previous php.bugs (#101962) next »