The inequality operators in php include: != and <>. They are all PHP comparison operators, used to compare two values and return true if one value is not equal to the other value.
!=, not equal to operator, returns true if $x is not equal to $y.
<?php $x = 17; $y = "17"; var_dump($x != $y); // 返回 false,因为值相等 ?>
<>, not equal to operator, returns true if $x is not equal to $y.
<?php $x = 17; $y = "17"; var_dump($x <> $y); // 返回 false,因为值相等 ?>
For more PHP related knowledge, please visit php中文网!
The above is the detailed content of What are the inequality operators in php?. For more information, please follow other related articles on the PHP Chinese website!