Posted on

PHP Conditionals

ExampleNameResult
$a == $bEqualtrue if $a is equal to $b.
$a === $bIdenticaltrue if $a is equal to $b, and they are of the same variable type.
$a != $bNot equaltrue if $a is not equal to $b.
$a <> $bNot equaltrue if $a is not equal to $b.
$a !== $bNot identicaltrue if $a is not equal to $b, or if they are not of the same variable type.
$a < $bLess thantrue if $a is less than $b.
$a > $bGreater thantrue if $a is greater than $b.
$a <= $bLess than or equal totrue if $a is less than or equal to $b.
$a >= $bGreater than or equal totrue if $a is greater than or equal to $b.