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;
?>
定義と使用法
unset()関数は、変数の設定を解除します。
構文
unset(variable, ....);
パラメータ値
Parameter | Description |
---|---|
variable | Required. Specifies the variable to unset |
... | Optional. Another variable to unset |
技術的な詳細
戻り値: | なし |
---|---|
返品タイプ: | なし |
PHPバージョン: | 4.0以降 |
❮PHP変数処理リファレンス