This question already has an answer here:
Answer
Solution:
From my comment
PHP uses a garbage collector this means that when a variable is finished with, it will be automatically deleted when the program decides.
Manually doing this is unlikely to meaningfully change performance, and it makes code harder to maintain, so I would advise against it.
Additions
The linked docs say, in a small PHP program, the garbage collector will never run, as there are not enough unused variables to "bother" with clearing them up. All variables will unset when the whole program is finished.
This means that manually unsetting a variable may actually give worse performance, because you do an unnecessary operation, though the difference is very small.
Source