The PHP array operators are used to compare arrays.
Operator | Name | Example | Result |
---|---|---|---|
+ |
Union | $x + $y |
Union of $x and $y |
== |
Equality | $x == $y |
True if $x and $y have the same key/value pairs |
=== |
Identity | $x === $y |
True if $x and $y have the same key/value pairs in the same order and of the same types |
!= |
Inequality | $x != $y |
True if $x is not equal to $y |
<> |
Inequality | $x <> $y |
True if $x is not equal to $y |
!== |
Non-identity | $x !== $y |
True if $x is not identical to $y |
bool(false) bool(false) bool(true) bool(true) bool(true)