php小提示

php中的"!="和“!==”有啥区别?看个例子就知道了:

$a=0;
var_dump($a!=false);       //result: bool(false)
var_dump($a!==false);     //result: bool(true)

"!=="要求被比较的变量是严格的bool类型,而"!="没有这个要求,"0"它也认为是false

相关文章

分类

留言:

关于文章

This page contains a single entry by DongHao published on 08 29, 2008 3:26 PM.

性能优化 was the previous entry in this blog.

兰花专家 is the next entry in this blog.

Find recent content on the main index or look in the 存档 to find all content.