Home >> PHP >> Comparision Operators in PHP

Comparision Operators in PHP

1-Operator-            X==Y
   Name-                 Equal
   Description-        True if X is equal to Y
   Example-            5==6 return false

2-Operator-            X===Y
   Name-                 Identical
   Description-        True if X is equal to Y, and they are of same type
   Example-            5==="5" return false and 5===5 return true

3-Operator-            X!=Y
   Name-                 Not Equal
   Description-        True if X is not equal to Y.
   Example-            5!==6 return true

4-Operator-            X<>Y
   Name-                 Not Equal
   Description-        True if X is not equal to Y.
   Example-            5<>6 return true

5-Operator-            X!==Y
   Name-                 Not Identical
   Description-        True if X is not equal to Y, or they are not same type.
   Example-            5!="5" return true

6-Operator-            X>Y
   Name-                 Greater than
   Description-        True if X is greater than Y.
   Example-            5>6 return true

7-Operator-            X<Y
   Name-                 Less than
   Description-        True if X is less than Y.
   Example-            5<6 return true

8-Operator-            X>=Y
   Name-                 Greater than or equal to
   Description-        True if X is greater than or equal to Y.
   Example-            5>=6 return false

9-Operator-            X<=Y
   Name-                 Less than or equal to
   Description-        True if X is less than or equal to Y.
   Example-            5<=6 return true

Post Your Comment

Next Questions
Logical operators
Array Operators
String
addcslashes() function
addslashes() function
chunk_split() function
crc32() function
explode() function
implode() function
join() function
ltrim() function
md5() function
metaphone() function
money_format() function
nl2br() function
number_format() function
ord() function
parse_str() function
printf() function
quotemeta() function
rtrim() function
sha1() function
sha1_file() function
similar_text() function
str_ireplace() function

Copyright ©2022 coderraj.com. All Rights Reserved.