php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40777 incorrect unpack
Submitted: 2007-03-11 18:44 UTC Modified: 2007-03-12 09:20 UTC
From: apachephp at gmailc dot om Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.1 OS: Centos 4.4
Private report: No CVE-ID: None
 [2007-03-11 18:44 UTC] apachephp at gmailc dot om
Description:
------------
unpack is wrong in 5.2.1 on my x86_64 box.
in 5.2.0 it was OK.

Reproduce code:
---------------
<?php
$v = pack("N", 4816);
var_dump(unpack('N', $v));
?>


Expected result:
----------------
array(1) {
 [1]=>
 int(4816)
} 


Actual result:
--------------
array(1) {
 [1]=>
 int(-2147478832)
} 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-12 09:20 UTC] tony2001@php.net
Duplicate of bug #40749.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC