Home > Backend Development > PHP Problem > How to express not equal in php

How to express not equal in php

藏色散人
Release: 2023-03-10 13:26:01
Original
6259 people have browsed it

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template