1/* == operator in PHP doesn't check for type.
2 ==, as you did, PHP treats NULL, false, 0, the
3 empty string, and empty arrays as equal.
4*/
5
6if($variable === NULL) {...}
7
8/* check == vs === */
9
10'' == NULL would return true
110 == NULL would return true
12false == null would return true
13
14where as
15
16'' === NULL would return false
170 === NULL would return false
18false === NULL would return false
19
20