Home >Backend Development >PHP Tutorial >How to check the current variable type in PHP_PHP tutorial

How to check the current variable type in PHP_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:06:19816browse

PHP method to view the current variable type

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
Liezi:
$sum=6;
echo ( is_string($sum) ? 'true' : 'false');
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1065652.htmlTechArticlePHP method to view the current variable type 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 column. ..
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