PHP is_null() 函数
PHP 教程
· 2019-01-31 18:59:50
is_null() 函数用于检测变量是否为 NULL。
PHP 版本要求: PHP 4 >= 4.0.4, PHP 5, PHP 7
语法
bool is_null ( mixed $var )
参数说明:
- $var:要检测的变量。
返回值
如果指定变量为 NULL,则返回 TRUE,否则返回 FALSE。
实例
实例
$var_name = TRUE;
$var_name2 = NULL;
if (is_null($var_name))
{
echo '变量 var_name 为 NULL' . PHP_EOL;
}
else
{
echo '变量 var_name 不为 NULL' . PHP_EOL;
}
if (is_null($var_name2))
{
echo '变量 var_name2 为 NULL' . PHP_EOL;
}
else
{
echo '变量 var_name2 不为 NULL' . PHP_EOL;
}
输出结果为:
变量 var_name 不为 NULL 变量 var_name2 为 NULL
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Hadoop: The Definitive Guide
Tom White / O'Reilly Media, Inc. / 2009 / 44.99
Apache Hadoop is ideal for organizations with a growing need to store and process massive application datasets. Hadoop: The Definitive Guide is a comprehensive resource for using Hadoop to build relia......一起来看看 《Hadoop: The Definitive Guide》 这本书的介绍吧!