The code is as follows:
Copy codeThe code is as follows:
$a;
$b = false;
$c = '';
$d = 0;
$e = null;
$f = array();
First is the var_dump output of empty:
boolean true
boolean true
boolean true
boolean true
boolean true
boolean true
Then the output of is_null:
boolean true
boolean false
boolean false
boolean false
boolean true
boolean false
Finally is the output of isset:
boolean false
boolean true
boolean true
boolean true
boolean false
boolean true
Therefore It can be seen that empty() can be used to determine whether all data types are empty or false, while is_null is basically the same as isset and can only be used to determine whether it is NULL and undefined.
http://www.bkjia.com/PHPjc/327918.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327918.htmlTechArticleThe code is as follows: Copy the code as follows: ?php $a; $b = false; $c = ''; $d = 0; $e = null; $f = array(); First is the empty var_dump output: boolean true boolean true boolean true bool...