Home  >  Article  >  Backend Development  >  PHP有没有is_type()函数?

PHP有没有is_type()函数?

WBOY
WBOYOriginal
2016-06-23 14:26:09822browse

http://docs.php.net/manual/zh/language.types.intro.php

如果只是想得到一个易读懂的类型的表达方式用于调试,用 gettype() 函数。要查看某个类型,不要用 gettype(),而用 is_type 函数。

问题:
1.PHP手册,有is_type( )函数么?


回复讨论(解决方案)


is_array -- 检测变量是否是数组
is_bool --  检测变量是否是布尔型 
is_callable --  检测参数是否为合法的可调用结构 
is_double -- is_float() 的别名
is_float -- 检测变量是否是浮点型
is_int -- 检测变量是否是整数
is_integer -- is_int() 的别名
is_long -- is_int() 的别名
is_null --  检测变量是否为 NULL 
is_numeric --  检测变量是否为数字或数字字符串 
is_object -- 检测变量是否是一个对象
is_real -- is_float() 的别名
is_resource --  检测变量是否为资源类型 
is_scalar --  检测变量是否是一个标量 
is_string -- 检测变量是否是字符串

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