By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

PHP Comparison Operators

Reference on the PHP Comparison Operators. These operators are used in comparison, such as if and switch statements.

Edited: 2015-12-04 10:32

This is the reference on Comparison Operators in PHP. You should also check out the PHP Operators Reference, for a complete list of Operators

These Operators are used for simple Comparison, such as that required in if statements and switch statements.

The Operators

< Less then
> Greater then
= Equal to
== Exactly Equal to
!= Not Equal to
<= Less then or Equal to
>= Greater then or Equal to