有两个不相等的运算符!=
和<>
。它们是一样的吗?或者它们彼此略有不同?
答案 0 :(得分:1)
他们是平等的:http://php.net/manual/en/language.operators.comparison.php
$a != $b // Not equal TRUE if $a is not equal to $b after type juggling.
$a <> $b // Not equal TRUE if $a is not equal to $b after type juggling.
$a !== $b // Not identical TRUE if $a is not equal to $b, or they are not of the same type.
答案 1 :(得分:1)
没有区别。您可以在MSSQL中使用它们。
!=
的功能与<>
(不等于)比较相同 操作
但<>
中定义了!=
而<>.
未定义NFiniteAutomaton
。因此,并非所有数据库引擎都支持它,如果您想生成可移植代码,我建议使用NFiniteAutomaton