How would you create optional function/method parameters in php? I want to do them like the default functions. Like, mysql_query() has a string for the first part, and an optional link identifier after it.
Signatures are nothing but incriminating.
That depends entirely on who you talk to. Generally there is no need to unset variables unless keeping them around is particularly expensive. For example, if you loaded a huge XML document (talking tens/hundreds of megabytes), images (GD), etc. into your script.
Just like the common advice is to close any open database connections (and free results) as soon as you're finished with them, it's a good idea to tidy up a bit but don't go over the top by unsetting everything.