This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list.
It used to be hard to find questions about operators and other syntax tokens.¹
The main idea is to have links to existing questions on Stack Overflow, so it's easier for us to reference them, not to copy over content from …
==和之间有什么区别===?
==比较究竟是如何运作的?===比较究竟是如何运作的?什么是有用的例子?
可能重复:
等式(== double equals)和identity(=== triple equals)比较运算符有何不同?
参考 - 这个符号在PHP中意味着什么?
php不等于!=和!==
这段代码片段中有哪些!==和===运算符?
if ( $a !== null ) // do something
if ( $b === $a ) // do something
Run Code Online (Sandbox Code Playgroud)