PHP 和 C 使用术语“标量变量”。
Scalar variables are those containing an integer, float, string or boolean. Types array, object and resource are not scalar.
有没有描述非标量变量的术语?
最佳答案
在数据类型方面(对于 PHP,不是 C):
大多数情况下,标量类型表示原始数据类型。接下来,您有复合类型(数组、对象)和其他类型(资源句柄)(这种数据类型分类依赖于 the ones from Wikipedia )。
在 PHP 中,NULL
不是标量的一部分。
这与 Types Introduction in the PHP Manual 中给出的组一致:
来自 is_scalar
function 的 PHP 手册条目:
Scalar types are those containing an integer, float, string or boolean. Types array, object and resource are not scalar.
关于php - 与标量变量相反,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27662715/