Home > php教程 > php手册 > body text

PHP 八种基本的数据类型

WBOY
Release: 2016-06-13 08:51:09
Original
1211 people have browsed it

PHP 八种基本的数据类型

四种标量类型:

boolean (布尔型)

integer (整型)

float (浮点型, 也称作 double)

string (字符串)

两种复合类型:

array (数组)

object (对象)

最后是两种特殊类型:

resource (资源)

NULL (NULL)

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!