|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45058 Integer Limit Problem
Submitted: 2008-05-21 14:47 UTC Modified: 2008-05-21 22:15 UTC
From: crbdigo at gmail dot com Assigned:
Status: Not a bug Package: *Programming Data Structures
PHP Version: 5.2CVS-2008-05-21 (CVS) OS: Windows Vista 64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: crbdigo at gmail dot com
New email:
PHP Version: OS:


 [2008-05-21 14:47 UTC] crbdigo at gmail dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-21 22:08 UTC] crrodriguez at suse dot de
This is the expected behaviuor.
 [2008-05-21 22:15 UTC]
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 14:01:31 2024 UTC