PHP tidak disetel () Fungsi
Referensi Penanganan Variabel PHP
Contoh
Variabel yang tidak disetel:
<?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;
?>
Definisi dan Penggunaan
Fungsi unset() menghapus variabel.
Sintaksis
unset(variable, ....);
Nilai Parameter
Parameter | Description |
---|---|
variable | Required. Specifies the variable to unset |
... | Optional. Another variable to unset |
Detail Teknis
Nilai Kembali: | Tidak ada |
---|---|
Jenis pengembalian: | Tidak ada |
Versi PHP: | 4.0+ |
Referensi Penanganan Variabel PHP