Home > Backend Development > PHP Tutorial > PHP self-study no00010 special data type null value

PHP self-study no00010 special data type null value

WBOY
Release: 2016-07-29 08:51:01
Original
1284 people have browsed it

<!--中间数组和对象在以后第7章和第14章可以学到这里书上略过-->
<!--特殊数据类型包括资源和空值-->
<!--资源通过专门的函数来建立和使用-->
<!--空值null3种情况,没赋任何值,被赋值null,被unset()函数销毁-->
<?php error_reporting(E_ALL ^ E_NOTICE); //忽略错误
	$string1 = null;
	$string3 = "str";
	if(is_null($string1))		//is_null()函数是判断变量是否为空
		echo &#39;$string1 = null&#39;;
	if(is_null($string2))
		echo &#39;$string2 = null&#39;;
	unset($string3);			//销毁$string3变量  没有值了变为null
	if(is_null($string3))
		echo &#39;$string3 = null&#39;;
?>
Copy after login

PHP self-study no00010 special data type null value

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template