", and the syntax is "$x != $y" and "$x <> $y" respectively. When $x is not equal to $y, true is returned. ."/> ", and the syntax is "$x != $y" and "$x <> $y" respectively. When $x is not equal to $y, true is returned. .">
Home >Backend Development >PHP Problem >php is not equal to
The php not equal comparison operator is !=
or a8093152e673feb7aba1828c43532094
.
!=
Not equal to $x != $y
Returns true if $x is not equal to $y.
Code example:
<?php $x = 17; $y = "17"; var_dump($x != $y); // 返回 false,因为值相等 ?>
Output:
bool(false)
a8093152e673feb7aba1828c43532094
not equal to $x a8093152e673feb7aba1828c43532094 $y
If $x is not equal to $y, return true.
<?php $x = 17; $y = "17"; var_dump($x <> $y); // 返回 false,因为值相等 ?>
Output:
bool(false)
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of php is not equal to. For more information, please follow other related articles on the PHP Chinese website!