Difference between "!==" and "==!" [closed]

The difference is that there is no operator ==!.

This expression:

$a ==! $b

Is basically the same as this:

$a == (!$b)

There is no ==! operator in PHP

Its just a combination of == and !. Only relevant operator present here is ==. So the combination ==! will work just as a normal ==, checking Equality, and trust me,

$variable_a ==! $variable_b 

is none other than

$variable_a == (!$variable_b)

and thus;

"a" ==! " ": bool(false)
"a" ==! "a": bool(false) //is same as "a" == (!"a")

And

true ==! false: bool(true)
true ==! true: bool(false)

Combining multiple operators characters may not work as an operator always. for example, if we take = and !, it will work as operators only if it is in the pattern of != or !==. There can be numerous combinations for these characters like !====, !==! etc.. etc.. Operator combinations should be in unique format, unique order, unique combinations (all characters wont combine with all other characters) and definitely, without any space between them.

Check the operators list below;

enter image description here


==! is not an operator but two :

== and !

! having a higher priority than ==

So :

"a" !== " ": bool(true) --> true because "a" is really not equal to " "

"a" ==! " ": bool(false) --> false because "a" is not equals to !" "

Could be written with a space between == and !.