PHP unset() Funktion
❮ Referenz zur Behandlung von PHP-Variablen
Beispiel
Variablen zurücksetzen:
<?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;
?>
Definition und Verwendung
Die Funktion unset() setzt eine Variable zurück.
Syntax
unset(variable, ....);
Parameterwerte
Parameter | Description |
---|---|
variable | Required. Specifies the variable to unset |
... | Optional. Another variable to unset |
Technische Details
Rückgabewert: | Keiner |
---|---|
Rückgabetyp: | Keiner |
PHP-Version: | 4.0+ |
❮ Referenz zur Behandlung von PHP-Variablen