In PHP because it is a weakly typed language, the different types of values can be implicitly converted, making false,null, ", 0, ' 0′ The comparison of these values is somewhat confusing, now summarizes:
Equal judgment
' = = NULL = = 0 = = False (equal)
Array () = 0 = = = NULL = = False (equal)
Array () <> "(unequal)
Identity judgment
Any two-digit comparison is not identical
Var_dump (false = = false); BOOL (TRUE)
Var_dump (false = = = False); BOOL (TRUE)
Var_dump (true = = true); BOOL (TRUE)
Var_dump (true = = = True); BOOL (TRUE)
Var_dump (' = = NULL); BOOL (TRUE)
Var_dump (' = = = NULL); BOOL (FALSE)
Var_dump (' = = 0); BOOL (TRUE)
Var_dump (' = = = 0); BOOL (FALSE)
Var_dump (' = = = False); BOOL (TRUE)
Var_dump (' = = = = False); BOOL (FALSE)
Var_dump (' = = True '); BOOL (FALSE)
Var_dump (' = = = True '); BOOL (FALSE)
Var_dump (Null = = 0); BOOL (TRUE)
Var_dump (Null = = 0); BOOL (FALSE)
Var_dump (Null = = False); BOOL (TRUE)
Var_dump (Null = = = False); BOOL (FALSE)
Var_dump (Null = = TRUE); BOOL (FALSE)
Var_dump (Null = = TRUE); BOOL (FALSE)
Var_dump (0 = = false); BOOL (TRUE)
Var_dump (0 = = = False); BOOL (FALSE)
Var_dump (0 = = true); BOOL (FALSE)
Var_dump (0 = = = True); BOOL (FALSE)
Some judgments about true
Var_dump (' 1 ' = = true); BOOL (TRUE)
Var_dump (' 1 ' = = = = True); BOOL (FALSE)
Var_dump (1 = = true); BOOL (TRUE)
Var_dump (1 = = = True); BOOL (FALSE)
Var_dump (Array () = = true); BOOL (FALSE)
Var_dump (Array () = = = True); BOOL (FALSE)
Array () comparison
Var_dump (Array () = = "); BOOL (FALSE)
Var_dump (Array () = = = "); BOOL (FALSE)
Var_dump (Array () = = NULL); BOOL (TRUE)
Var_dump (Array () = = = NULL); BOOL (FALSE)
Var_dump (Array () = = 0); BOOL (FALSE)
Var_dump (Array () = = = 0); BOOL (FALSE)
Var_dump (Array () = = false); BOOL (TRUE)
Var_dump (Array () = = = False); BOOL (FALSE)
Var_dump (Array () = = true); BOOL (FALSE)
Var_dump (Array () = = = True); BOOL (FALSE)
Identity comparison
Var_dump (0 = = = ' 0 '); BOOL (FALSE)
Var_dump (0 = = 00); BOOL (TRUE)
Var_dump (xx = = = Intval (' 0 ')); BOOL (TRUE)
PHP 0,null,empty, NULL, FALSE, string relationship (GO)