#41344 [Opn->Bgs]: Error returning long values in the headers
| From: | tony2001@php.net | Date: | Thu, 10 May 2007 20:04:00 +0000 |
| Subject: | #41344 [Opn->Bgs]: Error returning long values in the headers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112497@lists.php.net to get a copy of this message | ||
ID: 41344
Updated by: tony2001@php.net
Reported By: zeta2ste2000 at yahoo dot it
-Status: Open
+Status: Bogus
Bug Type: SOAP related
Operating System: HP-UX 11.11
PHP Version: 5.2.2
New Comment:
Floating point values have a limited precision. Hence a value might
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly
printing it without any mathematical operations.
If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2007-05-10 07:07:10] zeta2ste2000 at yahoo dot it
Description:
------------
When I have to manage a long number in the header, the __soapCall
function returns a float number in exponential format. The original sent
value can't be retrieved and the returned one is different.
Reproduce code:
---------------
A Java server sends a sessionID in the header with the following value
: 339051398236687110
This is the client code :
$soapclient->__soapCall('beginSession',$parameters, null, null,
$header);
echo $header["sessionID"]; // returns 3.3905139823669E+17 , an
// invalid value for the next call
// and with less digits than required
$strNum = number_format($header["sessionID"], 0, "", "");
echo $strNum; // returns the rounded value
// 339051398236687050 , that is
// different from the original
// 339051398236687110
Expected result:
----------------
The header has to contain 339051398236687110
Actual result:
--------------
The header contain 3.3905139823669E+17
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41344&edit=1