I want to define a function and unset it after its use just like we do with variables.
$a = \'something\';
unset($a);
echo $a; // outputs nothing
A solution that avoids the requirement to unset a function and still use traditional functions....
This way, if you are looping through code, you wont get an issue with calling the same function twice. I find this a neater solution and it makes it easier to call. you can then use url extensions to call groups of function or classes.
Clearly this doesn't answer the request to remove, unset or destroy a function but it provides an alternate approach which may prove useful.