";
echo "empty(NULL) = " . strBool(empty($var1)) . "
";
echo "isset(\"\") = " . strBool(isset($var2)) . "
";
echo "empty(\"\") = " . strBool(empty($var2)) . "
";
echo "isset(\"abc\") = " . strBool(isset($var3)) . "
";
echo "empty(\"abc\") = " . strBool(empty($var3)) . "
";
echo "isset(未定義の変数) = " . strBool(isset($var4)) . "
";
echo "empty(未定義の変数) = " . strBool(empty($var4)) . "
";
function strBool($var){
if($var){
return "true ";
}else{
return "false";
}
}
?>