ID: 38770 User updated by: fwmatt at dsl dot pipex dot com Reported By: fwmatt at dsl dot pipex dot com -Status: Bogus +Status: Open Bug Type: Unknown/Other Function Operating System: Linux x86_64 PHP Version: 5.1.6 New Comment:
Sorry for re-opening this but; Why should the same code produce different output on a 64bit machine than it does on a 32bit machine ? If 4294937296 is the expect result then it is broken on 32bit machines where it returns -30000. Previous Comments: ------------------------------------------------------------------------ [2006-09-10 16:03:10] [EMAIL PROTECTED] http://php.net/pack: N - unsigned long (always 32 bit, big endian byte order) ------------------------------------------------------------------------ [2006-09-10 15:55:20] fwmatt at dsl dot pipex dot com 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 this bug report at http://bugs.php.net/?id=38770&edit=1