Home  >  Article  >  Backend Development  >  php判断表达式中false在==前后的区别?

php判断表达式中false在==前后的区别?

WBOY
WBOYOriginal
2016-06-23 14:15:391054browse

false在==前后的区别


回复讨论(解决方案)

没有区别,习惯而已

没有区别,习惯而已
有人这样说:这个是为了解决逻辑判断错误的写法,如果false置前,但只写一个=号的情况下,不会出现语句错误!

正相反!如果写作 false = $a 会产生 Parse error: syntax error, unexpected '=' in 错误
而 $a = false 就不会

自己对自己就那么没信心?

嗯 我说反了。

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