php类型转换

一、转换为整型

在变量前使用(integer)或者(int)。

二、转换为浮点型

在变量前使用(float)

三、转换为字符串型

在变量前使用(string)

四、转换为布尔型

在变量前使用(boolean)或者(bool)

五、转换为数组

在变量前使用(array)

六、转换为对象

在变量前使用(object)

你可能感兴趣的:(php类型转换)