Home > Backend Development > PHP Problem > What is the inequality operator in php

What is the inequality operator in php

藏色散人
Release: 2023-03-14 06:26:01
Original
11675 people have browsed it

There are three types of inequality operators in PHP, namely: 1. != symbol, used to compare the values ​​of two variables; 2. symbol, indicating inequality, and != symbol usage Same; 3. !== symbol, which means absolutely not equal. If the two variable values ​​​​are different or their types are not the same, then true is returned.

What is the inequality operator in php

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.

What is the inequality operator in php?

The inequality operators in php are !=, , !==.

You can take a look at the example:

x != y: Not equal, 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 58 Return true;

x !== y: Absolutely not equal, if x is not equal to y, or their types are not If they are the same, return true 5!=="5" Return true .

What is the inequality operator in php

Recommended study: "PHP Video Tutorial"

The above is the detailed content of What is the inequality operator 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