<p>We have a customer that is trying to call our web service written in C# from PHP code. The web service call takes a long as parameter.</p>

<p>This call works fine for other customers calling from C# or Java but this customer is getting an error back from the call. I haven't debugged their specific call but I am guessing that the 64bit integer is getting truncated somehow from PHP. The customer says they are just making the web service call with a string but is there a wrapper in PHP that does type conversion. Could this be losing the number information?</p>

<p>Thanks for any info.</p>

Most PHP installations won't support 64 bit integers - 32 is the max.  You can check this by reading the PHP_INT_SIZE constant (4 = 32bit, 8 = 64bit) or read the PHP_INT_MAX value.
```
```
<?php

echo PHP_INT_SIZE, "\n", PHP_INT_MAX;

?>
```
```
If the web service class he is using is trying to type-convert a string representation of a 64 bit integer, then yes, it's mostly likely being truncated or converted into a float.  You can sort of see this behavior with this simple test
```
```
<?php

echo intval( "12345678901234567890" );
// prints 2147483647, the max value for a 32 bit signed int.
```
```
Without knowing the details of his implementation, it's difficult to postulate on what a good solution/workaround might be.