PHP unset() 函数
实例
未设置变量:
<?php
$a = "Hello world!";
echo "The value of variable 'a' before unset: " . $a . "<br>";
unset($a);
echo "The value of variable 'a' after unset: " . $a;
?>
亲自试一试 »
$a = "Hello world!";
echo "The value of variable 'a' before unset: " . $a . "<br>";
unset($a);
echo "The value of variable 'a' after unset: " . $a;
?>
定义和用法
The unset() function unsets a variable.
语法
  unset(variable, ....);
参数值
| 参数 | 描述 | 
|---|---|
| variable | 必需。指定要取消设置的变量 | 
| ... | 可选。另一个要取消设置的变量 | 
技术细节
| 返回值: | None | 
|---|---|
| 返回类型: | None | 
| PHP 版本: | 4.0+ | 
