<!--中间数组和对象在以后第7章和第14章可以学到这里书上略过--> <!--特殊数据类型包括资源和空值--> <!--资源通过专门的函数来建立和使用--> <!--空值null3种情况,没赋任何值,被赋值null,被unset()函数销毁--> <?php error_reporting(E_ALL ^ E_NOTICE); //忽略错误 $string1 = null; $string3 = "str"; if(is_null($string1)) //is_null()函数是判断变量是否为空 echo '$string1 = null'; if(is_null($string2)) echo '$string2 = null'; unset($string3); //销毁$string3变量 没有值了变为null if(is_null($string3)) echo '$string3 = null'; ?>
The above has introduced the null value of the special data type no00010 in PHP self-study, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.