问题
Normally I would use !=
, then when I saw this sign <>
it means not equal to as well.
After that, I went to search on Google, what's the difference between <>
and !=
. But I could not find the answer.
Anyone care to explain?
回答1:
<>
has a higher precedence than !=
. Otherwise they're identical.
回答2:
There is no difference. Some languages use <> and some use !=, and some like PHP allow both.
回答3:
According to the PHP docs, they're the same.
回答4:
In PHP, != and <> are equivalent, you can see more about them here: http://www.php.net/manual/en/language.operators.comparison.php
回答5:
some languages do not know the != operator, instead they use <>
but in PHP you can use both
回答6:
VB.NET use <> instead of !=
来源:https://stackoverflow.com/questions/3956362/whats-the-difference-between-and