PHP tutorial PHP 0 with NULL null false difference
650) this.width=650; "src=" Http://www.cdtedu.com/uploads/allimg/161017/1-16101G0595G46.png "alt=" Training "style=" border:0px; "/>
The reason is that in PHP the variables are stored in the C language structure, and the empty string and null,false are stored with a value of 0, where the struct has a zend_uchar type, a member variable that is used to hold the type of the variable, and the type of the empty string is string, The type of NULL is Null,false is Boolean.
This can be used with echo GetType ("); and Echo GetType (NULL); the = = = operator is not only the comparison value, but also the comparison type, so the third one is false!
So it can be said that = = = is equal to the following function:
650) this.width=650; "src=" Http://www.cdtedu.com/uploads/allimg/161017/1-16101G10005517.png "alt=" Training "style=" border:0px; "/>
So the empty string ('), False,null and 0 are values equal and the type is different!
Attention:
Null is a special type.
Null in both cases
1. $var = NULL;
2. $var;
3. "", 0, "0", NULL, FALSE, Array (), Var $var; and objects that do not have any properties will be considered empty and return TRUE if Var is empty.
Summarize
From the above example we can see that Null,0,false is false, and that ' is an empty string is not a null value.
PHP tutorial PHP 0 with NULL null false difference