Press "Enter" to skip to content

phpComparisonOperators

PHP Comparison Operators

Comparison operators to determine the similarity between values.

Operator NameOpertor
equal==
identical===
Not Equal!= or <>
Not identical!==
less than value

<

greater than>
less than or equal to

  <=

greater than or equal to>=

Example for PHP Comparison Operators

<?php
$n=40;$m=20;
if($n > $m)
{
echo “Number one is greater”;
}
?>