The difference between 0 and null in php. As a qualified php programmer, some basic knowledge must be known, such as the difference between 0 and null. for this difference, we will perform a simple analysis using several instances, as a qualified php programmer, some basic knowledge must be known, such as the difference between 0 and null. for this difference, we will perform a simple analysis using several instances, the principle can only be explained. readers can learn it by themselves.
In php, 0 is null; // output} if ($ test = '') {echo'
In php, 0 is NULL; // not output} if ($ test = NULL) {echo'
In php, 0 is NULL; // output} if ($ test = NULL) {echo'
In php, 0 is null; // not output} if ($ test = false) {echo'
In php, 0 is null; // output} if ($ test = false) {echo'
In php, 0 is null; // no output}?>
Articles you may be interested in
- Use break, continue, goto, return, and exit in multiple loops in PHP
- Differences between variables and functions in php after the static keyword is added
- Differences between echo, print, print_r, var_export, and var_dump in php
- Empty, is_null, and isset in php
- Difference between execute and query methods in ThinkPHP
- Differences and usage of return, exit, break, and contiue in PHP
- PHP merges arrays + and array_merge
- Differences between synchronous requests and asynchronous requests in http requests
...