What's the difference between “<>” and “!=”? [duplicate]

[亡魂溺海] 提交于 2019-11-30 04:55:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!