Home >Backend Development >PHP Tutorial >PHP中的''、零、null 相等?

PHP中的''、零、null 相等?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:01:34755browse

PHP中的''、0、null 相等?!
猜猜以下代码输出结果,初学php语言,跟java比,输出结果让我有点吃惊

//$str1,$str2='';//语法有错误$str1=null;$str2='';if($str1==0)	echo "相等";else	echo "不等";	echo '<br>','<br>','<br>';	if($str2==0)	echo "相等";else	echo "不等";

Statement:
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