Home  >  Article  >  php教程  >  PHP 八种基本的数据类型

PHP 八种基本的数据类型

WBOY
WBOYOriginal
2016-06-13 08:51:091235browse

PHP 八种基本的数据类型

四种标量类型:

boolean (布尔型)

integer (整型)

float (浮点型, 也称作 double)

string (字符串)

两种复合类型:

array (数组)

object (对象)

最后是两种特殊类型:

resource (资源)

NULL (NULL)

如果要将一个变量强制转换为某类型,可以对其使用强制转换或者 settype() 函数。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn