convert bytes to GB in php
<p>I want to convert bytes to GB.
value= 8587321344</p>

<p>So it should be 8587321344/1024/1024/1024</p>

<p>But whenever I go to divide, the value is wrong...
If I cast it into integer, it will be limited to 2147....</p>

<p>Can't find any type cast to long data type...</p>

<p>Funny enough...</p>

<p>How to perform this calculation to show correct output...</p>

<p>The maximum value depends on the system. 32 bit systems have a maximum signed integer range of -2147483648 to 2147483647. So for example on such a system, intval('1000000000000') will return 2147483647. The maximum signed integer value for 64 bit systems is 9223372036854775807. </p>
