PHP Comparison Operators
Syntax
Comparison operators in PHP are used to compare two values and return a boolean result (true or false).
== // Equal!= // Not equal< // Less than> // Greater than<= // Less than or equal>= // Greater than or equalExample
<?php$x = 20;$y = 15;
echo $x == $y; // Outputs:echo $x != $y; // Outputs: 1echo $x < $y; // Outputs:echo $x > $y; // Outputs: 1echo $x <= $y; // Outputs:echo $x >= $y; // Outputs: 1?>