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

PHP查看当前变量类型的方法

WBOY
Release: 2016-06-13 08:52:21
Original
1152 people have browsed it

PHP查看当前变量类型的方法

is_array

is_bool

is_callable

is_double

is_float

is_int

is_integer

is_long

is_null

is_numeric

is_object

is_real

is_resource

is_scalar

is_string

 

列子:

 

$sum=6;

echo ( is_string($sum) ? 'true' : 'false');

 

?>

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