<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> dec_var.php </title>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head> <body>
<?php
$a=0.1; //定义变量
$b=0; //0 值
$c=""; //空字符串
if (isset($a))
echo '$a 已经被定义<br>';
else
echo '$a 没有被定义<br>';if (!empty($a))
echo '$a 不为空<br>';
else
echo '$a 为空<br>';
echo '<hr>';if (isset($b))
echo '$b 已经被定义<br>';
else
echo '$b 没有被定义<br>';if (!empty($b))
echo '$b 不为空<br>';
else
echo '$b 为空<br>';
echo '<hr>';if (isset($c))
echo '$c 已经被定义<br>';
else
echo '$c 没有被定义<br>';if (!empty($c))
echo '$c 不为空<br>';
else
echo '$c 为空<br>';
echo '<hr>';if (isset($d))
echo '$d 已经被定义<br>';
else
echo '$d 没有被定义<br>';
if (!empty($d))
echo '$d 不为空<br>';
else
echo '$d 为空<br>';
echo '<hr>';
?>
</body>
</html><!--
-->
$a 已经被定义
$a 不为空
$b 已经被定义
$b 为空
$c 已经被定义
$c 为空
$d 没有被定义
$d 为空