use of unset in php

use of unset in php


Unset is used for destroys the specified variables.
example:
<?php

function destroy() 
{
global $test;
unset($test);
}

$test = 'hai';
destroy();
echo $test ;
?>