Apologies, but this answer actually only raised more questions for me.
Firstly, this is my initial contact with PHP, so just to be clear by 'destroy' a variable do you mean to remove references to a particular memory location or actually destroy destroy that piece of particular data? Because wouldn't that increase the machine's overhead?
Secondly, I guess I didn't make question clear enough, but what I wanted to know why is unset($lang); outside of foreach? Variable $lang is a local variable that exists inside the foreach brackets, how can unset() access a local variable? I am viewing this from a Python&Java background, am I wrong?
Finally, say if the unset() works as intended, the other question from me is why is it necessary to 'destroy' the variable here. Is it always a good practice to destroy the iterated variable used in foreach?