As a qualified PHP programmer, you must know some basic knowledge, such as the difference between 0 and null. Regarding this difference, the following is a simple analysis through several examples. The truth is only It can be understood but cannot be expressed in words. Readers can slowly understand it by themselves.
<?php
$test=0;
if($test==''){
echo '<br />在php中,0即为空'; //被输出
}
if($test===''){
echo '<br />在php中,0即为空'; //不被输出
}
if($test==NULL){
echo '<br />在php中,0即为空'; //被输出
}
if($test===NULL){
echo '<br />在php中,0即为空'; //不被输出
}
if($test==false){
echo '<br />在php中,0即为空'; //被输出
}
if($test===false){
echo '<br />在php中,0即为空'; //不被输出
}
?>
Copy after login
Articles you may be interested in
- The usage and difference of using break, continue, goto, return, exit to break out of multiple loops in PHP
- Variables in PHP The difference between adding the static keyword before the function
- Usage and difference of echo, print, print_r, var_export, var_dump in php
- Detailed explanation of the difference between empty, is_null and isset in php
- The difference between execute and query methods in ThinkPHP
- The difference and usage of return and exit, break and contiue in PHP
- The difference between PHP merge array + and array_merge
- http The difference between synchronous requests and asynchronous requests in requests
http://www.bkjia.com/PHPjc/764081.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764081.htmlTechArticleAs a qualified PHP programmer, you must know some basic knowledge, such as the difference between 0 and null. Regarding this difference, let’s conduct a simple analysis through several examples, among which...