Quote Originally Posted by litewarez View Post
ok lets say your script run in like a sequence!!

Frist you start up and load constants then a registry then DB ect.. you could unset after each sequence like this


LOAD Config/Constants
LOAD DATABASE - unset(...,...,...,...,...,);
LOAD MIAN CLASS unset(...,...,);

unset takes multiple vats so if you unset the vars after each block of code.. block as like 6 classes for a certain task im sure that would be clean and better than not using it...

Also id rather my site be the best performance than keep my code 100% clean

But both your points are right
Yes, you can do that. But it will only be a microoptimisation unless done in a large script is what im saying.
JmZ Reviewed by JmZ on . PHP TIP: Unset() : Memory Usage! This is just a tip for when your building your applications in PHP and why you should use the unset() function. For unset there are 2 main reason why you would use such a command. To unset a variable so you can redeclare it later as a fresh variable! Reduce memory usage dure the execution of your script Now the main problem in PHP scripts is keeping large variables throught the whole execution of the script, causing the script to slow down dramatically after the variable is set.. Rating: 5