From:             vivekanandan8 at yahoo dot com
Operating system: all os 
PHP version:      5.3.0RC1
PHP Bug Type:     Strings related
Bug description:  pack & unpack missing for 64 bit data

Description:
------------
In the PHP 5.3,packing and unpacking function is done like Perl,
but like in Perl processing for 64 bit data is missing.Hence  Implemented
it and tested it, the source code as follows 
http://www.gnudeveloper.com/software/php-5.3/pack.c

The PHP example code also found at      

http://www.gnudeveloper.com/forum/viewtopic.php?f=4&t=11&p=27#p27
 
  


Reproduce code:
---------------
$vBinData = pack("Q", 0x1234567812345678);
$vHexData = bin2hex($vBinData);
var_dump($vHexData);

list(,$v32Value) = unpack('Q',
chr(0x80).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x09));
print $v32Value.'<br>'."\n";
echo hexdec(dechex($v32Value)) . "0x" . dechex($v32Value) . "<br>";

Expected result:
----------------
7856341278563412
0900000000000080


Actual result:
--------------
This is not implemented  like in Perl 

-- 
Edit bug report at http://bugs.php.net/?id=48085&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48085&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48085&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48085&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48085&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48085&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48085&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48085&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48085&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48085&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48085&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48085&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48085&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48085&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48085&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48085&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48085&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48085&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48085&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48085&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48085&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48085&r=mysqlcfg

Reply via email to