", 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  >  Article  >  Backend Development  >  php is not equal to

php is not equal to

藏色散人
藏色散人Original
2019-10-18 10:15:413445browse

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!

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