I am working with huge numbers for website purposes and I need long calculation. When I echo a long number I don't get the correct output.
Example
// A random number $x = 100000000000000000000000000; $x = number_format($x); echo "The number is: $x <br>"; // Result: 100,000,000,000,000,004,764,729,344 // I'm not getting the value assigned to $x
PHP_INT_MAXvalue. The exact numbers are2147483647 (32-bit)and9223372036854775807 (64-bit). php.net/manual/en/language.types.integer.php