<?php
$a = 10;
$b = 5;
// Equal to operator
if ($a == $b) {
echo "$a is equal to $b <br>";
}
// Not equal to operator
if ($a != $b) {
echo "$a is not equal to $b <br>";
}
// Identical operator
$a = "10";
if ($a === 10) {
echo "$a is identical to 10 <br>";
} else {
echo "$a is not identical to 10 <br>";
}
// Not identical operator
$a = "10";
if ($a !== 10) {
echo "$a is not identical to 10 <br>";
}
// Greater than operator
if ($a > $b) {
echo "$a is greater than $b <br>";
}
// Less than operator
if ($a < $b) {
echo "$a is less than $b <br>";
}
// Greater than or equal to operator
if ($a >= $b) {
echo "$a is greater than or equal to $b <br>";
}
// Less than or equal to operator
if ($a <= $b) {
echo "$a is less than or equal to $b <br>";
}
?>