<?php
$a = 0; ==> compliant with Empty,empty ($a) is true
$a = ' 0 '; ==> compliant with Empty,empty ($a) is true
$a = "; ==> compliant with Empty,empty ($a) is true
$a = "; ==> does not meet empty,empty ($a) for flase
$a = null; ==> compliant with Empty,empty ($a) is true
$a = ' null '; ==> does not meet empty,empty ($a) for flase
$a = true; ==> does not meet empty,empty ($a) for flase//"Easy error" here do not know why there is no error, and also for the flase
$a = ' true '; ==> does not meet empty,empty ($a) for flase
$a = flase; ==> error, no constants defined
$a = ' flase '; ==> does not meet empty,empty ($a) for flase
$a = []; ==> compliant with Empty,empty ($a) is true
$a = array (); ==> compliant with Empty,empty ($a) is true
if (empty ($a)) {
Echo ' conforms to the empty type ';
}else{
Echo ' does not conform to the empty type ';
}
?>
= = Summary: Common special values are the same as empty ($a) is true, but non-0 non-empty strings are not compliant (including the space string ' ', ' null ', ' true ', ' flase ', except 0 string ' 0 ' and the empty string ' ')
Whether the empty () function is true in PHP