"."/> ".">

Home >Backend Development >PHP Problem >What is the expression method of equal and not equal in php?

What is the expression method of equal and not equal in php?

L
LOriginal
2020-06-01 10:42:146663browse

What is the expression method of equal and not equal in php?

Comparison operator in php

$a == $b is equal to TRUE if $a Equal to $b.
$a === $b Congruent TRUE if $a is equal to $b and their types are also the same. (Introduced in PHP 4)
$a != $b is not equal to TRUE if $a is not equal to $b.
$a <> $b is not equal to TRUE if $a is not equal to $b.
$a !== $b is not congruent TRUE if $a is not equal to $b, or their types are different. (Introduced in PHP 4)
$a < $b is less than TRUE if $a is strictly less than $b.
$a > $b is greater than TRUE if $a is strictly $b.
$a <= $b is less than or equal to TRUE if $a is less than or equal to $b.
$a >= $b is greater than or equal to TRUE, if $a is greater than or equal to $b.

Recommended tutorial: "PHP Tutorial"

The above is the detailed content of What is the expression method of equal and 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