This article mainly introduces the difference between the number 0 and the null value in php, and uses an instance for your convenience. if you need it, you can refer to it as a qualified php programmer, some basic knowledge must be known, for example, the difference between 0 and null. for this difference, we will use several instances for simple analysis. The principle is only acceptable, but it cannot be said, readers can learn it by themselves.
The code is as follows:
$ Test = 0;
If ($ test = ''){
Echo'
In php, 0 is null; // output
}
If ($ test = ''){
Echo'
In php, 0 is null; // no output
}
If ($ test = NULL ){
Echo'
In php, 0 is null; // output
}
If ($ test = NULL ){
Echo'
In php, 0 is null; // no output
}
If ($ test = false ){
Echo'
In php, 0 is null; // output
}
If ($ test = false ){
Echo'
In php, 0 is null; // no output
}
?>