How to handle a value exceeding 16 digits in PHP?

I call the method using SOAPclient, and the method (remote external SOAP web service) returns me a 19-digit number. I can’t control what is coming back. When I print the value of this number, only the first 16 digits are accurate. I tried casting types, GMP, etc. But it looks like all 19 digits are already lost when php assigns a value to a variable based on the result of the web service call. So there is no way to get the value.

$client = new SoapClient($sccSystemWSDL);
try{
    $sessionID = $client->logonUser($adminUser,$passWord);
}

On a 64 bit machine, I did not have this problem. But now I have to run this on a 32-bit machine and no luck so far.

+5
source share
2 answers

BCMath, , . precision , , 20.

+5

BCMath . phpseclib BigInteger, BCMath GMP, PHP.

, , , PHP , , . , . 32- , 2 ^ 31, 64- 2 ^ 63 ( , , , ).

+1

All Articles