PHP自学no00010特殊数据类型之空值

来源:互联网 发布:地图画路线软件 编辑:程序博客网 时间:2024/06/07 06:46

<!--中间数组和对象在以后第7章和第14章可以学到这里书上略过--><!--特殊数据类型包括资源和空值--><!--资源通过专门的函数来建立和使用--><!--空值null3种情况,没赋任何值,被赋值null,被unset()函数销毁--><?phperror_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变量  没有值了变为nullif(is_null($string3))echo '$string3 = null';?>








0 0
原创粉丝点击