y" mode, which means when x is not equal to y , then returns true; 3. "x !== y" method means it is absolutely not equal."/> y" mode, which means when x is not equal to y , then returns true; 3. "x !== y" method means it is absolutely not equal.">

Home  >  Article  >  Backend Development  >  How to express not equal in php

How to express not equal in php

藏色散人
藏色散人Original
2021-06-10 09:17:066215browse

There are three ways to express inequality in php, namely: 1. "x != y" mode, which means if x is not equal to y, return true; 2. "x <> y" mode , which means that when x is not equal to y, it returns true; 3. "x !== y" method means that it is absolutely not equal.

How to express not equal in php

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

How to express not equal in php?

  • x != y Not equal to If x is not equal to y, return true 5!=8 Return true

  • x <> y Not equal If x is not equal to y, return true 5<>8 Return true

  • ##x !== y Definitely not equal If x is not equal to y, or they are not the same type , then return true 5!=="5" Return true

[Recommended learning:

PHP video tutorial]

The above is the detailed content of How to express not equal in php. For more information, please follow other related articles on the PHP Chinese website!

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