How to deregister global variables in php recently looked at high-performance php and found that global variables should be deregistered after they are used up to release the memory. Baidu later found the unregister_globals (); & nbsp; function, but not too sure. Please give me some advice ~~ ------ Solution ------------------ how do you mostly log off global variables in the & nbsp; function & nbsp; glo php?
I recently looked at high-performance php and found that the global variables should be logged out after they are used up to release the memory.
Baidu later found the unregister_globals (); function, but not too sure.
Please give me some advice ~~
------ Solution --------------------
Most of you are in the global function, right? The function is automatically released after it runs... so you don't need to do anything.
I guess you are confused with $ GLOBAL.
------ Solution --------------------
Global only declares reference of global variables in the function.
Do not abuse it outside the function to avoid unnecessary misunderstanding.
Php releases all resources at the end of the program, including variables.