xProteuSx Posted November 10, 2011 Share Posted November 10, 2011 I am trying to tidy up the code for my site, and I have a ton of MySQL queries and variables that have not been unset/freed. Is there any way to view stored variables, other than session variables??? (because I know how to do that already) Quote Link to comment https://forums.phpfreaks.com/topic/250860-show-all-set-variables/ Share on other sites More sharing options...
cypher86 Posted November 10, 2011 Share Posted November 10, 2011 once the page is "scripted" the variables and the connections are unset automatically Quote Link to comment https://forums.phpfreaks.com/topic/250860-show-all-set-variables/#findComment-1287014 Share on other sites More sharing options...
AyKay47 Posted November 10, 2011 Share Posted November 10, 2011 use get_defined_vars Quote Link to comment https://forums.phpfreaks.com/topic/250860-show-all-set-variables/#findComment-1287035 Share on other sites More sharing options...
Adam Posted November 10, 2011 Share Posted November 10, 2011 PHP's garbage collection is a little arbitrary even if you unset variables, and connections are closed automatically at the end of the request. While it is good to remove what you don't need, I would concentrate more on improving the efficiency in other ways, like your actual queries for example. Quote Link to comment https://forums.phpfreaks.com/topic/250860-show-all-set-variables/#findComment-1287036 Share on other sites More sharing options...
xProteuSx Posted November 10, 2011 Author Share Posted November 10, 2011 AyKay47: thank you; I'll look into that. Adam: will do! Quote Link to comment https://forums.phpfreaks.com/topic/250860-show-all-set-variables/#findComment-1287042 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.