#45058 [Opn->Bgs]: Integer Limit Problem

From: Date: Wed, 21 May 2008 22:15:56 +0000
Subject: #45058 [Opn->Bgs]: Integer Limit Problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125169@lists.php.net to get a copy of this message
 ID:               45058
 Updated by:       felipe@php.net
 Reported By:      crbdigo at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *Programming Data Structures
 Operating System: Windows Vista 64
 PHP Version:      5.2CVS-2008-05-21 (CVS)
 New Comment:

.


Previous Comments:
------------------------------------------------------------------------

[2008-05-21 22:08:13] crrodriguez at suse dot de

This is the expected behaviuor.

http://php.net/manual/en/language.types.integer.php

------------------------------------------------------------------------

[2008-05-21 14:47:26] crbdigo at gmail dot com

Description:
------------
I'm using the PHP V5.2.0 on Windows Vista 64 Bits, I have a error when
I try to convert a string "97722694578" to a integer, the value of
variable is modified to 2147483647 (int limit of php).
I'd have this problem when I try to send the value to a Web Service
(APS.NET/C#) with the SoapClass of PHP, how the parameter on WS is a
"long" the PHP tried to convert to a integer, then the value is modified
to 2147483647.
Soluction: Convert the variable to "float" on PHP before send's to WS.
That works :D.

Thank you

Reproduce code:
---------------
$variable = "97722694578";
settype($variable, "float");
and send to WS.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45058&edit=1



Thread (3 messages)

« previous php.bugs (#125169) next »