php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6640 Pack/Unpack problem
Submitted: 2000-09-09 09:57 UTC Modified: 2001-05-11 21:47 UTC
From: ed_zhang at excite dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.2 OS: Windows 98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
45 - 6 = ?
Subscribe to this entry?

 
 [2000-09-09 09:57 UTC] ed_zhang at excite dot com
Hi friends,

Please try following PHP code:

<? 
$a=unpack("dx",pack("d",3.1415926));
print($a["x"]);
?>

It's supposed to be "3.1415926", but it return "6.3886672646707E-315".

It seems the problem appears in all versions of PHP4, includes PHP 4.0, PHP 4.0.1, PHP 4.0.1 pl2 and PHP 4.0.2, under Windows 98 environment.


Thanks & Regards,
Edward Zhang

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-09 10:00 UTC] derick@php.net
dup of #6639
 [2001-05-11 21:47 UTC] sniper@php.net
submitted twice (sorry, really old report, ignore this)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC