PHP-007- [type] -NULL data type

Learning Points
is_null: to determine whether the object is a null reference

<?php
//定义NULL
$var=NULL;
echo is_null($var);//1 表示是
echo '<hr />';

$var1=" ";
echo is_null($var1);//和书本上说的有些不一样 空返回
//echo is_null($none);//Undefined variable: //报错
echo '<hr />';

unset($var1);
echo is_null($var1);//Undefined variable: //报错
?>

 

Published 47 original articles · won praise 3 · Views 1972

Guess you like

Origin blog.csdn.net/yueyekonglong/article/details/103988132