在PHP中使用long int [英] Using long int in PHP
本文介绍了在PHP中使用long int的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试这个,但我无法存储大值
I am trying this out, but am unable to store large value
$var = rand(100000000000000,999999999999999);
echo $var; // prints a 9 digit value(largest possible)
如何获得所需的值?
推荐答案
PHP整数通常为32位。其他软件包提供更高精度的整数: http://php.net/manual/en /language.types.integer.php
PHP ints are typically 32 bits. Other packages provide higher-precision ints: http://php.net/manual/en/language.types.integer.php
这篇关于在PHP中使用long int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文