Acerca de Linux, BSD y notas personales

unset()

unset()
Syntax:
    void unset(mixed var [, mixed var, ...])
var
    Variable to unset.
Unsets a variable.
unset() destroys one or more variables and deallocates the memory associated with them.
Code:

<?php

$a = “Some data”;

unset($a);
if (!isset($a)) {
   print “\$a is no longer available”;
}

?>

Output:

$a is no longer available

Leave a comment

You must be logged in to post a comment.