#46483 [Fbk->Opn]: ext/soap does not convert unsigned longs with values >2147483647 to floats
ID: 46483
User updated by: rosiefitzpatrick at grouplogic dot com
Reported By: rosiefitzpatrick at grouplogic dot com
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: Mac OS 10.5.5
PHP Version: 5.2.6
New Comment:
The snapshot does not contain this bug. On 32-bit Leopard it converts
to a float with the correct value just as it does on Tiger. Thank you!
Previous Comments:
------------------------------------------------------------------------
[2008-11-04 22:27:43] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2008-11-04 17:24:35] rosiefitzpatrick at grouplogic dot com
Description:
------------
On a 32-bit Leopard system (Intel Core Duo), when my SOAP server
returns an unsigned long whose value is greater than 2147483647, the
SoapClient interprets this value as an integer with value 2147483647.
On a 64-bit Leopard system (Intel Core 2 Duo), the SoapClient interprets
the value as an integer with the correct value (whatever was in the XML
from the server).
On a 32-bit Tiger (Mac OS X 10.4) system running PHP 5.2.0, it comes
back from the SoapClient class as a float with the correct integer value
that was sent from the server.
Expected result:
----------------
According to the PHP docs (and the behavior of ext/soap in 5.2.0), an
integer with greater than maximum value is converted to a float.
Actual result:
--------------
Instead of converting the unsigned long to a float and retaining the
value, it remains an integer with PHP_INT_MAX value.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46483&edit=1
Thread (4 messages)