Equal Operator¶
Equal is the state of two variables, which contains the same data, after an optional cast to a common type. It is the same as identical, with possible silent type-juggling.
The equal operators are ==, !=, <>, and <=>. The switch() command also uses equal comparisons.
<?php
var_dump(0 == '0000'); // true
var_dump(0 == '0'); // false
var_dump(0 == 0); // true
?>
Related : Comparison, Identical Operator, Inequality