PHP中的float和double之间的区别?

问题描述:

我有这个代码

$vad = 1.1;

print gettype($vad);

var_dump($vad);

这将输出:

double
float(1.1) 

所以它在php中是double还是float?

So it is double or float in php?

PHP没有区别. floatdoublereal是相同的数据类型.

There is no difference in PHP. float, double or real are the same datatype.

在C级别,所有内容都存储为double.
实际大小仍然取决于平台.

At the C level, everything is stored as a double.
The real size is still platform-dependent.

有关更多详细信息,请参见手册:
http://www.php.net/manual/en/language.types .float.php

See the manual for more details:
http://www.php.net/manual/en/language.types.float.php