0
What is (using) function variable in php
We have (using) function in C# that when chosed this block, remove all connections and variables Do you know what is this function similar in php???
3 Answers
+ 1
PHP and C# are quite different in this regard I believe, using is for garbage collection. PHP handles its garbage collection differently and will clear memory automatically as long as you follow code best practices.
Closing connections is easily done simply by unsetting the variable holding the connection. global variables will be kept, but function specific are handled by the GC.
0
When you use style like this
Using name(){...}
When your block is close, it's look like you call GC method and clear any thing
This method is deferential to try catch style
0
Thanks